Skip to content

Commit

Permalink
Switch to own coordinates, enable CI/CD via GitHub Actions and some
Browse files Browse the repository at this point in the history
minor cleanups
  • Loading branch information
rvullriede committed Nov 8, 2023
1 parent c9950ea commit e2aa3b2
Show file tree
Hide file tree
Showing 5 changed files with 194 additions and 11 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "maven" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
30 changes: 30 additions & 0 deletions .github/workflows/maven-publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish release package to the Maven Central Repository
on:
release:
types: [ created ]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Install gpg secret key
run: |
# Install gpg secret key
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
# Verify gpg secret key
gpg --list-secret-keys --keyid-format LONG
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -P release clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn --batch-mode --update-snapshots package
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
CoinGecko Client (Java)
=======================
![GitHub](https://img.shields.io/github/license/osslabz/coingecko-client)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/osslabz/coingecko-client/maven.yml?branch=master)
[![Maven Central](https://img.shields.io/maven-central/v/net.osslabz/coingecko-client?label=Maven%20Central)](https://search.maven.org/artifact/net.osslabz/coingecko-client)

This is a (synced) fork of [Philipinho/CoinGecko-Java](https://github.com/Philipinho/CoinGecko-Java) that is properly releases on [Maven Central](https://search.maven.org/artifact/net.osslabz/coingecko-client).

---

---

# CoinGecko-Java
Java wrapper for the CoinGecko API.
<p align="center">
Expand Down Expand Up @@ -43,4 +55,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
127 changes: 117 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,156 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.litesoftwares</groupId>
<groupId>net.osslabz</groupId>
<artifactId>coingecko-java</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0.0</version>

<name>${project.groupId}:${project.artifactId}</name>
<description>Allows to decode raw input data from an EVM smart contract call (on Ethereum or a compatible chain like
Avalanche, BSC etc.) into a processable format obtained from the contract's ABi definition (JSON).
</description>
<url>https://github.com/osslabz/coingecko-client</url>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<retrofit.version>2.9.0</retrofit.version>
</properties>

<licenses>
<license>
<name>MIT License</name>
<url>https://opensource.org/license/mit/</url>
</license>
</licenses>

<developers>
<developer>
<name>Philip Okugbe</name>
<email>[email protected]</email>
<organization>Philipinho/CoinGecko-Java</organization>
<organizationUrl>https://github.com/Philipinho/CoinGecko-Java</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:ssh://[email protected]/osslabz/coingecko-client.git</connection>
<developerConnection>scm:git:ssh://[email protected]/osslabz/coingecko-client.git</developerConnection>
<url>https://github.com/osslabz/coingecko-client</url>
<tag>HEAD</tag>
</scm>

<dependencies>

<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>retrofit</artifactId>
<version>2.9.0</version>
<version>${retrofit.version}</version>
</dependency>

<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>converter-jackson</artifactId>
<version>2.9.0</version>
<version>${retrofit.version}</version>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>

</dependencies>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<doclint>none</doclint>
<failOnError>false</failOnError>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<release>${maven.compiler.release}</release>
</configuration>
</plugin>
</plugins>
</build>
</project>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

</project>

0 comments on commit e2aa3b2

Please sign in to comment.