Skip to content

Commit e2aa3b2

Browse files
committed
Switch to own coordinates, enable CI/CD via GitHub Actions and some
minor cleanups
1 parent c9950ea commit e2aa3b2

File tree

5 files changed

+194
-11
lines changed

5 files changed

+194
-11
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "maven" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish release package to the Maven Central Repository
2+
on:
3+
release:
4+
types: [ created ]
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Install gpg secret key
11+
run: |
12+
# Install gpg secret key
13+
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
14+
# Verify gpg secret key
15+
gpg --list-secret-keys --keyid-format LONG
16+
- uses: actions/checkout@v3
17+
- name: Set up JDK
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: 17
21+
distribution: 'temurin'
22+
cache: maven
23+
server-id: ossrh
24+
server-username: MAVEN_USERNAME
25+
server-password: MAVEN_PASSWORD
26+
- name: Publish package
27+
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -P release clean deploy
28+
env:
29+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
30+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

.github/workflows/maven.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
name: Java CI with Maven
4+
5+
on:
6+
push:
7+
branches: [ master ]
8+
pull_request:
9+
branches: [ master ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Set up JDK
17+
uses: actions/setup-java@v3
18+
with:
19+
java-version: 17
20+
distribution: 'temurin'
21+
cache: maven
22+
- name: Build with Maven
23+
run: mvn --batch-mode --update-snapshots package

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
CoinGecko Client (Java)
2+
=======================
3+
![GitHub](https://img.shields.io/github/license/osslabz/coingecko-client)
4+
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/osslabz/coingecko-client/maven.yml?branch=master)
5+
[![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)
6+
7+
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).
8+
9+
---
10+
11+
---
12+
113
# CoinGecko-Java
214
Java wrapper for the CoinGecko API.
315
<p align="center">
@@ -43,4 +55,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4355
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4456
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4557
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
46-
SOFTWARE.
58+
SOFTWARE.

pom.xml

Lines changed: 117 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,156 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7-
<groupId>com.litesoftwares</groupId>
7+
<groupId>net.osslabz</groupId>
88
<artifactId>coingecko-java</artifactId>
9-
<version>1.0-SNAPSHOT</version>
9+
<version>1.0.0</version>
10+
11+
<name>${project.groupId}:${project.artifactId}</name>
12+
<description>Allows to decode raw input data from an EVM smart contract call (on Ethereum or a compatible chain like
13+
Avalanche, BSC etc.) into a processable format obtained from the contract's ABi definition (JSON).
14+
</description>
15+
<url>https://github.com/osslabz/coingecko-client</url>
1016

1117
<properties>
12-
<maven.compiler.source>1.8</maven.compiler.source>
13-
<maven.compiler.target>1.8</maven.compiler.target>
18+
<maven.compiler.release>8</maven.compiler.release>
1419
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20+
21+
<retrofit.version>2.9.0</retrofit.version>
1522
</properties>
1623

24+
<licenses>
25+
<license>
26+
<name>MIT License</name>
27+
<url>https://opensource.org/license/mit/</url>
28+
</license>
29+
</licenses>
30+
31+
<developers>
32+
<developer>
33+
<name>Philip Okugbe</name>
34+
<email>[email protected]</email>
35+
<organization>Philipinho/CoinGecko-Java</organization>
36+
<organizationUrl>https://github.com/Philipinho/CoinGecko-Java</organizationUrl>
37+
</developer>
38+
</developers>
39+
40+
<scm>
41+
<connection>scm:git:ssh://[email protected]/osslabz/coingecko-client.git</connection>
42+
<developerConnection>scm:git:ssh://[email protected]/osslabz/coingecko-client.git</developerConnection>
43+
<url>https://github.com/osslabz/coingecko-client</url>
44+
<tag>HEAD</tag>
45+
</scm>
46+
1747
<dependencies>
1848

1949
<dependency>
2050
<groupId>com.squareup.retrofit2</groupId>
2151
<artifactId>retrofit</artifactId>
22-
<version>2.9.0</version>
52+
<version>${retrofit.version}</version>
2353
</dependency>
2454

2555
<dependency>
2656
<groupId>com.squareup.retrofit2</groupId>
2757
<artifactId>converter-jackson</artifactId>
28-
<version>2.9.0</version>
58+
<version>${retrofit.version}</version>
2959
</dependency>
3060

3161
<dependency>
3262
<groupId>org.projectlombok</groupId>
3363
<artifactId>lombok</artifactId>
34-
<version>1.18.28</version>
64+
<version>1.18.30</version>
3565
<scope>provided</scope>
3666
</dependency>
3767

3868
</dependencies>
69+
70+
<profiles>
71+
<profile>
72+
<id>release</id>
73+
<build>
74+
<plugins>
75+
<plugin>
76+
<groupId>org.apache.maven.plugins</groupId>
77+
<artifactId>maven-source-plugin</artifactId>
78+
<version>3.3.0</version>
79+
<executions>
80+
<execution>
81+
<id>attach-sources</id>
82+
<goals>
83+
<goal>jar-no-fork</goal>
84+
</goals>
85+
</execution>
86+
</executions>
87+
</plugin>
88+
<plugin>
89+
<groupId>org.apache.maven.plugins</groupId>
90+
<artifactId>maven-javadoc-plugin</artifactId>
91+
<version>3.5.0</version>
92+
<executions>
93+
<execution>
94+
<id>attach-javadocs</id>
95+
<goals>
96+
<goal>jar</goal>
97+
</goals>
98+
<configuration>
99+
<doclint>none</doclint>
100+
<failOnError>false</failOnError>
101+
</configuration>
102+
</execution>
103+
</executions>
104+
</plugin>
105+
<plugin>
106+
<groupId>org.apache.maven.plugins</groupId>
107+
<artifactId>maven-gpg-plugin</artifactId>
108+
<version>3.1.0</version>
109+
<executions>
110+
<execution>
111+
<id>sign-artifacts</id>
112+
<phase>verify</phase>
113+
<goals>
114+
<goal>sign</goal>
115+
</goals>
116+
</execution>
117+
</executions>
118+
</plugin>
119+
<plugin>
120+
<groupId>org.sonatype.plugins</groupId>
121+
<artifactId>nexus-staging-maven-plugin</artifactId>
122+
<version>1.6.13</version>
123+
<extensions>true</extensions>
124+
<configuration>
125+
<serverId>ossrh</serverId>
126+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
127+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
128+
</configuration>
129+
</plugin>
130+
</plugins>
131+
</build>
132+
</profile>
133+
</profiles>
134+
39135
<build>
40136
<plugins>
41137
<plugin>
42138
<groupId>org.apache.maven.plugins</groupId>
43139
<artifactId>maven-compiler-plugin</artifactId>
44140
<version>3.11.0</version>
45141
<configuration>
46-
<source>1.8</source>
47-
<target>1.8</target>
142+
<release>${maven.compiler.release}</release>
48143
</configuration>
49144
</plugin>
50145
</plugins>
51146
</build>
52-
</project>
147+
148+
<distributionManagement>
149+
<snapshotRepository>
150+
<id>ossrh</id>
151+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
152+
</snapshotRepository>
153+
<repository>
154+
<id>ossrh</id>
155+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
156+
</repository>
157+
</distributionManagement>
158+
159+
</project>

0 commit comments

Comments
 (0)