-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from lightningj-org/updated-other-deps
Update of dependencies and gradle to 7.5.1
- Loading branch information
Showing
21 changed files
with
228 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Java CI JDK 17 | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b | ||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee | ||
with: | ||
arguments: build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.gradle | ||
build | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,99 @@ | ||
group 'org.lightningj' | ||
|
||
version '0.15.1-Beta' | ||
|
||
apply plugin: "groovy" | ||
apply plugin: 'com.google.protobuf' | ||
apply plugin: 'idea' | ||
apply plugin: 'org.asciidoctor.convert' | ||
apply plugin: 'project-report' | ||
apply plugin: 'org.ajoberstar.git-publish' | ||
apply plugin: 'signing' | ||
apply plugin: 'maven' | ||
|
||
description = "LightningJ - Lightning APIs for Java" | ||
|
||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
|
||
repositories { | ||
// Spock releases are available from Maven Central | ||
mavenCentral() | ||
// Spock snapshots are available from the Sonatype OSS snapshot repository | ||
// maven { url "http://oss.sonatype.org/content/repositories/snapshots/" } | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
jcenter() | ||
maven { url "https://dl.bintray.com/asciidoctor/maven/"} | ||
gradlePluginPortal() | ||
} | ||
dependencies { | ||
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.10" | ||
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.16" | ||
|
||
classpath "org.spockframework:spock-core:1.3-groovy-2.5" | ||
//classpath "org.spockframework:spock-core:1.3-groovy-2.5" | ||
|
||
// optional dependencies for using Spock | ||
classpath "org.hamcrest:hamcrest-core:1.3" // only necessary if Hamcrest matchers are used | ||
classpath "net.bytebuddy:byte-buddy:1.9.7" // allows mocking of classes (in addition to interfaces) | ||
classpath "org.objenesis:objenesis:2.5.1" // allows mocking of classes without default constructor (together with CGLIB) | ||
|
||
// Documentation generation | ||
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.7' | ||
classpath 'org.ajoberstar:gradle-git-publish:2.1.3' | ||
// https://mvnrepository.com/artifact/org.asciidoctor/asciidoctor-gradle-plugin | ||
// classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.6.1' | ||
classpath 'org.ajoberstar.git-publish:gradle-git-publish:3.0.1' | ||
|
||
// JAX-B dependencies for JDK 9+ | ||
classpath "javax.xml.bind:jaxb-api:2.2.11" | ||
classpath "com.sun.xml.bind:jaxb-core:2.2.11" | ||
classpath "com.sun.xml.bind:jaxb-impl:2.2.11" | ||
classpath "javax.activation:activation:1.1.1" | ||
classpath 'jakarta.xml.bind:jakarta.xml.bind-api:3.0.0' | ||
classpath 'com.sun.xml.bind:jaxb-impl:3.0.0' | ||
classpath 'javax.annotation:javax.annotation-api:1.3.2' | ||
} | ||
} | ||
|
||
plugins { | ||
id 'java-library' | ||
id 'groovy' | ||
id 'com.google.protobuf' version "0.8.16" | ||
id 'idea' | ||
id 'project-report' | ||
id 'org.ajoberstar.git-publish' version "3.0.1" | ||
id 'org.asciidoctor.jvm.convert' version '3.3.2' | ||
id 'signing' | ||
id 'maven-publish' | ||
} | ||
|
||
group 'org.lightningj' | ||
|
||
version '0.15.3-Beta' | ||
|
||
description = "LightningJ - Lightning APIs for Java" | ||
|
||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
//gRPC | ||
compile 'com.google.api.grpc:googleapis-common-protos:0.0.3' | ||
compile 'io.netty:netty-tcnative-boringssl-static:2.0.40.Final' | ||
compile 'io.grpc:grpc-netty-shaded:1.39.0' | ||
compile 'io.grpc:grpc-protobuf:1.39.0' | ||
compile 'io.grpc:grpc-stub:1.39.0' | ||
implementation 'com.google.api.grpc:proto-google-common-protos:2.9.6' | ||
implementation 'io.netty:netty-tcnative-boringssl-static:2.0.54.Final' | ||
api "io.grpc:grpc-netty-shaded:$grpcVersion" | ||
implementation "io.grpc:grpc-protobuf:$grpcVersion" | ||
implementation "io.grpc:grpc-stub:$grpcVersion" | ||
|
||
// JSON-P | ||
compile 'javax.json:javax.json-api:1.0' | ||
compile 'org.glassfish:javax.json:1.1.2' | ||
implementation 'javax.json:javax.json-api:1.1.4' | ||
implementation 'org.glassfish:javax.json:1.1.4' | ||
|
||
// JAX-B dependencies for JDK 9+ | ||
compile "javax.xml.bind:jaxb-api:2.2.11" | ||
compile "com.sun.xml.bind:jaxb-core:2.2.11" | ||
compile "com.sun.xml.bind:jaxb-impl:2.2.11" | ||
compile "javax.activation:activation:1.1.1" | ||
|
||
compile("javax.annotation:javax.annotation-api:1.3.2") | ||
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:3.0.0' | ||
implementation 'com.sun.xml.bind:jaxb-impl:3.0.0' | ||
implementation 'javax.annotation:javax.annotation-api:1.3.2' | ||
|
||
// JMacaroon | ||
// compile 'com.github.nitram509:jmacaroons:0.3.1' | ||
// implementation 'com.github.nitram509:jmacaroons:0.3.1' | ||
|
||
testImplementation 'jakarta.xml.bind:jakarta.xml.bind-api:3.0.0' | ||
testImplementation 'com.sun.xml.bind:jaxb-impl:3.0.0' | ||
testImplementation 'javax.annotation:javax.annotation-api:1.3.2' | ||
|
||
// mandatory dependencies for using Spock | ||
testCompile "org.spockframework:spock-core:1.3-groovy-2.5" | ||
testImplementation platform("org.spockframework:spock-bom:2.1-groovy-3.0") | ||
testImplementation "org.spockframework:spock-core" | ||
|
||
// optional dependencies for using Spock | ||
testCompile "org.hamcrest:hamcrest-core:1.3" // only necessary if Hamcrest matchers are used | ||
testRuntime "net.bytebuddy:byte-buddy:1.9.7" // allows mocking of classes (in addition to interfaces) | ||
testRuntime "org.objenesis:objenesis:2.5.1" // allows mocking of classes without default constructor (together with CGLIB) | ||
|
||
testImplementation 'org.hamcrest:hamcrest-core:2.2' // only necessary if Hamcrest matchers are used | ||
testRuntimeOnly 'net.bytebuddy:byte-buddy:1.12.17' // allows mocking of classes (in addition to interfaces) | ||
testRuntimeOnly 'org.objenesis:objenesis:3.3' // allows mocking of classes without default constructor (together with CGLIB) | ||
} | ||
|
||
/* | ||
Task for generating Lowlevel LND GRPC API | ||
*/ | ||
protobuf { | ||
protoc { | ||
artifact = "com.google.protobuf:protoc:3.7.1" | ||
artifact = "com.google.protobuf:protoc:$protobufVersion" | ||
} | ||
plugins { | ||
grpc { | ||
artifact = 'io.grpc:protoc-gen-grpc-java:1.23.0' | ||
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion" | ||
} | ||
} | ||
generateProtoTasks { | ||
|
@@ -111,6 +110,9 @@ compileJava { | |
source += ['build/generated/source/wrapper/main/java'] | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
/* | ||
Generate High Level LDN API using custom WrapperClassGenerator in buildSrc | ||
|
@@ -128,8 +130,11 @@ task compileWrapperMessages(type: JavaCompile, dependsOn: generateWrappers){ | |
source = compileJava.source | ||
//classpath = files('build/classes/main') | ||
classpath = compileJava.classpath + files('build/classes/java/main') | ||
destinationDir = compileJava.destinationDir | ||
destinationDirectory.set(compileJava.destinationDirectory.get()) | ||
} | ||
compileTestGroovy.dependsOn(compileWrapperMessages) | ||
javadoc.dependsOn(compileWrapperMessages) | ||
|
||
|
||
/* | ||
Generate XSD of all generated High Level Message classes, fist dependency configuration then | ||
|
@@ -139,8 +144,8 @@ configurations{ | |
xsdClassPathConf | ||
} | ||
dependencies { | ||
xsdClassPathConf 'javax.json:javax.json-api:1.0' | ||
xsdClassPathConf 'org.glassfish:javax.json:1.1.2' | ||
xsdClassPathConf 'javax.json:javax.json-api:1.1.4' | ||
xsdClassPathConf 'org.glassfish:javax.json:1.1.4' | ||
} | ||
|
||
task generateXSD(type: XSDGenerator, dependsOn: compileWrapperMessages){ | ||
|
@@ -154,6 +159,7 @@ task generateXSD(type: XSDGenerator, dependsOn: compileWrapperMessages){ | |
*/ | ||
jar.dependsOn.add(generateXSD) | ||
|
||
//sourcesJar.dependsOn(generateProto) | ||
/* | ||
Adds generated source directories to be included in javadoc generation. | ||
*/ | ||
|
@@ -172,7 +178,11 @@ asciidoctor { | |
] | ||
} | ||
|
||
task ('doc',type: Copy,dependsOn: [javadoc, asciidoctor, htmlDependencyReport]){ | ||
|
||
task ('doc',type: Copy,dependsOn: [javadoc, asciidoctor, htmlDependencyReport, test]){ | ||
from('build/docs/'){ | ||
include('index.html') | ||
} | ||
from('build/reports/project/'){ | ||
include('dependencies/**') | ||
} | ||
|
@@ -238,17 +248,19 @@ gitPublish { | |
} | ||
|
||
task javadocJar(type: Jar) { | ||
classifier = 'javadoc' | ||
archiveClassifier.set('javadoc') | ||
from javadoc | ||
} | ||
javadocJar.dependsOn(asciidoctor) | ||
|
||
task sourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
archiveClassifier.set('sources') | ||
from sourceSets.main.allSource | ||
from 'build/generated/source/proto/main/grpc' | ||
from 'build/generated/source/proto/main/java' | ||
from 'build/generated/source/wrapper/main/java' | ||
} | ||
sourcesJar.dependsOn(compileWrapperMessages) | ||
|
||
artifacts { | ||
archives javadocJar, sourcesJar | ||
|
@@ -257,61 +269,73 @@ artifacts { | |
// Add integration test task, with source sets etc. | ||
apply from: 'integrationTest.gradle' | ||
|
||
// Use external gpg2 command to support signing by hardware keys (i.e. SmartCard) and sign only | ||
// if build should be uploaded to Maven Central. | ||
signing { | ||
required { gradle.taskGraph.hasTask(uploadArchives) } | ||
useGpgCmd() | ||
sign configurations.archives | ||
} | ||
|
||
signArchives.onlyIf {gradle.taskGraph.hasTask(uploadArchives)} | ||
|
||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
pom.project { | ||
name 'lightningj' | ||
packaging 'jar' | ||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
from components.java | ||
artifact tasks.sourcesJar | ||
artifact tasks.javadocJar | ||
pom { | ||
name = 'lightningj' | ||
packaging = 'jar' | ||
// optionally artifactId can be defined here | ||
description 'LightningJ - Lightning APIs for Java' | ||
url 'http://www.lightningj.org' | ||
description = 'LightningJ - Lightning APIs for Java' | ||
url ='http://www.lightningj.org' | ||
|
||
|
||
scm { | ||
connection 'https://github.com/lightningj-org/lightningj.git' | ||
developerConnection 'https://github.com/lightningj-org/lightningj.git' | ||
url 'https://github.com/lightningj-org/lightningj' | ||
connection = 'https://github.com/lightningj-org/lightningj.git' | ||
developerConnection = 'https://github.com/lightningj-org/lightningj.git' | ||
url ='https://github.com/lightningj-org/lightningj' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'GNU Lesser General Public License v3.0' | ||
url 'http://www.gnu.org/licenses/lgpl.txt' | ||
name = 'GNU Lesser General Public License v3.0' | ||
url = 'http://www.gnu.org/licenses/lgpl.txt' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'herrvendil' | ||
name 'Philip Vendil' | ||
email '[email protected]' | ||
id = 'herrvendil' | ||
name = 'Philip Vendil' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
// Currently is only releaes published. | ||
// To add support for snapshot releases add following logic | ||
//url = isReleaseBuild() ? "https://oss.sonatype.org/service/local/staging/deploy/maven2/": "https://oss.sonatype.org/content/repositories/snapshots/" | ||
url = (project.version =~ "SNAPSHOT"? "https://oss.sonatype.org/content/repositories/snapshots/" : "https://oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials { | ||
username = ossrhUsername | ||
password = ossrhPassword | ||
} | ||
} | ||
} | ||
} | ||
|
||
uploadArchives.dependsOn.add(signArchives) | ||
// Use external gpg2 command to support signing by hardware keys (i.e. SmartCard) and sign only | ||
// if build should be uploaded to Maven Central. | ||
signing { | ||
required { gradle.taskGraph.hasTask(publish) } | ||
useGpgCmd() | ||
sign publishing.publications.maven | ||
} | ||
|
||
signMavenPublication.onlyIf {gradle.taskGraph.hasTask(publish)} | ||
|
||
publish.dependsOn.add(signMavenPublication) | ||
|
||
afterEvaluate { | ||
generateTestProto.dependsOn(compileWrapperMessages) | ||
extractIncludeTestProto.dependsOn(compileWrapperMessages) | ||
extractIncludeIntegrationTestProto.dependsOn(compileWrapperMessages) | ||
compileIntegrationTestGroovy.dependsOn(compileWrapperMessages) | ||
} |
Oops, something went wrong.