Skip to content

Commit 06eee14

Browse files
authored
add support for maven central
2 parents 629d4c0 + e53bbf9 commit 06eee14

3 files changed

Lines changed: 109 additions & 5 deletions

File tree

build.gradle

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
plugins {
2-
id 'java'
2+
id 'java-library'
3+
id 'cl.franciscosolis.sonatype-central-upload' version '1.0.3'
34
}
45

56
group = 'com.adscore'
6-
version = '1.0.1'
7+
version = '1.0.0'
78

89
java {
910
sourceCompatibility = JavaVersion.VERSION_1_8
1011
targetCompatibility = JavaVersion.VERSION_1_8
1112
toolchain {
1213
languageVersion = JavaLanguageVersion.of(21)
1314
}
15+
withJavadocJar()
16+
withSourcesJar()
17+
artifacts {
18+
archives javadocJar, sourcesJar
19+
}
1420
}
1521

1622
repositories {
@@ -29,4 +35,33 @@ dependencies {
2935

3036
test {
3137
useJUnitPlatform()
32-
}
38+
}
39+
40+
sonatypeCentralUpload {
41+
def gradlePropertiesFile = file('.gradle/gradle.properties')
42+
if (gradlePropertiesFile.exists()) {
43+
gradlePropertiesFile.withInputStream { stream ->
44+
def properties = new Properties()
45+
properties.load(stream)
46+
properties.each { key, value -> project.ext[key] = value }
47+
}
48+
}
49+
50+
//generate in Central Portal
51+
username = project.findProperty("ossrhUsername")
52+
password = project.findProperty("ossrhToken")
53+
54+
def projBuild = "build/libs/java-common-${version}.jar"
55+
def javaDocBuild = "build/libs/java-common-${version}-javadoc.jar"
56+
def sourceBuild = "build/libs/java-common-${version}-sources.jar"
57+
archives = files(projBuild, javaDocBuild, sourceBuild)
58+
59+
pom = file("pom-default.xml")
60+
61+
signingKey= file('.gradle/key_priv.txt').text
62+
signingKeyPassphrase = project.findProperty("signing.password")
63+
def pub = "gpg --armor --export ${project.findProperty("signing.keyId")}".execute().text
64+
publicKey = pub
65+
66+
publishingType = "MANUAL"
67+
}

pom-default.xml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
<!-- This module was also published with a richer model, Gradle metadata, -->
5+
<!-- which should be used instead. Do not delete the following line which -->
6+
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
7+
<!-- that they should prefer consuming it instead. -->
8+
<!-- do_not_remove: published-with-gradle-metadata -->
9+
<modelVersion>4.0.0</modelVersion>
10+
<groupId>com.adscore</groupId>
11+
<artifactId>java-common</artifactId>
12+
<version>1.0.0</version>
13+
<name>java-common</name>
14+
<description>This library provides various utilities for parsing [Adscore](https://adscore.com) signatures v4 and v5, and virtually anything that might be useful for customers doing server-side integration with the service.</description>
15+
<url>https://github.com/Adscore/java-common</url>
16+
<licenses>
17+
<license>
18+
<name>MIT License</name>
19+
<url>https://raw.githubusercontent.com/Adscore/java-common/refs/heads/master/LICENSE.md</url>
20+
</license>
21+
</licenses>
22+
<developers>
23+
<developer>
24+
<id>aparzych</id>
25+
<name>Adrian Parzych</name>
26+
<email>adrian.parzych@iterative.pl</email>
27+
</developer>
28+
<developer>
29+
<id>kgasior</id>
30+
<name>Krzysztof Gąsior</name>
31+
<email>krzysztof.gasior@iterative.pl</email>
32+
</developer>
33+
</developers>
34+
<scm>
35+
<connection>scm:git:git://github.com:Adscore/java-common.git</connection>
36+
<developerConnection>scm:git:ssh://github.com:Adscore/java-common.git</developerConnection>
37+
<url>https://github.com/Adscore/java-common</url>
38+
</scm>
39+
<dependencies>
40+
<dependency>
41+
<groupId>org.abstractj.kalium</groupId>
42+
<artifactId>kalium</artifactId>
43+
<version>0.8.0</version>
44+
<scope>runtime</scope>
45+
</dependency>
46+
<dependency>
47+
<groupId>com.marcospassos</groupId>
48+
<artifactId>phpserializer</artifactId>
49+
<version>0.8.0</version>
50+
<scope>runtime</scope>
51+
</dependency>
52+
<dependency>
53+
<groupId>com.fasterxml.jackson.core</groupId>
54+
<artifactId>jackson-databind</artifactId>
55+
<version>2.17.1</version>
56+
<scope>runtime</scope>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.msgpack</groupId>
60+
<artifactId>msgpack-core</artifactId>
61+
<version>0.9.8</version>
62+
<scope>runtime</scope>
63+
</dependency>
64+
<dependency>
65+
<groupId>com.github.seancfoley</groupId>
66+
<artifactId>ipaddress</artifactId>
67+
<version>5.5.0</version>
68+
<scope>runtime</scope>
69+
</dependency>
70+
</dependencies>
71+
</project>

src/main/java/com/adscore/signature/Signature4Verifier.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
/**
55
* Entry point of AdScore signature v4 verification library. It expose verify method allowing to verify
66
* AdScore signature against given set of ipAddress(es) for given zone.
7-
*
8-
* @author Łukasz Hyła <lhyla@iterative.pl>
97
*/
108
public class Signature4Verifier {
119

0 commit comments

Comments
 (0)