Skip to content

Commit

Permalink
Merge branch 'gradle-85' into 'master'
Browse files Browse the repository at this point in the history
Build: Update gradle to 8.5

See merge request i2p-hackers/i2p.i2p!180
  • Loading branch information
zzz committed Jan 28, 2024
2 parents fdb75d6 + c54ec4d commit 8da5e01
Show file tree
Hide file tree
Showing 25 changed files with 180 additions and 132 deletions.
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ distributions. See the source package for the additional license information.
Admin Manager:
Public domain

Gradle wrapper 5.2.1:
Gradle wrapper 8.5:
(not included in most distribution packages)
Copyright (c) 2017 the original author or authors.
Copyright (c) 2023 the original author or authors.
See licenses/LICENSE-Apache2.0.txt
12 changes: 8 additions & 4 deletions apps/desktopgui/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'java-library'
}

sourceSets {
main {
java {
Expand All @@ -8,10 +12,10 @@ sourceSets {
}

dependencies {
compile project(':core')
compile project(':router')
compile project(':installer')
compile project(':apps:systray')
api project(':core')
api project(':router')
api project(':installer')
api project(':apps:systray')
}

// Create the java files from the po files. The jar task will compile them.
Expand Down
11 changes: 7 additions & 4 deletions apps/i2pcontrol/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
id 'java-library'
id 'war'
}

Expand All @@ -11,13 +12,15 @@ sourceSets {
}

dependencies {
providedCompile project(':router')
providedCompile project(':apps:jetty')
providedCompile files('../../installer/lib/wrapper/all/wrapper.jar')
api project(':router')
api project(':apps:jetty')
api files('../../installer/lib/wrapper/all/wrapper.jar')
api fileTree("../jetty/apache-tomcat-${tomcatVersion}")
api fileTree("../jetty/jetty-distribution-${jettyVersion}")
}

war {
archiveName 'jsonrpc.war'
archiveBaseName.set('jsonrpc')
webXml = file('web.xml')
}

Expand Down
13 changes: 7 additions & 6 deletions apps/i2psnark/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
id 'java-library'
id 'war'
}

Expand All @@ -12,14 +13,14 @@ sourceSets {
}

dependencies {
compile project(':core')
providedCompile project(':apps:systray')
compile 'gnu.getopt:java-getopt:1.0.13'
providedCompile project(':apps:ministreaming')
providedCompile project(':apps:jetty')
api project(':core')
api project(':apps:systray')
api 'gnu.getopt:java-getopt:1.0.13'
api project(':apps:ministreaming')
api project(':apps:jetty')
// this is not needed except for standalone,
// but we build the standalone classes even for non-standalone
providedCompile project(':apps:desktopgui')
api project(':apps:desktopgui')
}

task i2psnarkJar(type: Jar) {
Expand Down
21 changes: 12 additions & 9 deletions apps/i2ptunnel/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
id 'java-library'
id 'war'
}

Expand All @@ -18,13 +19,14 @@ sourceSets {
}

dependencies {
compile project(':core')
providedCompile project(':apps:ministreaming')
compile 'gnu.getopt:java-getopt:1.0.13'
providedCompile project(':apps:jetty')

implementation 'org.apache.ant:ant:1.10.10'
implementation fileTree("../jetty/apache-tomacat-${tomcatVersion}")
api project(':core')
api project(':apps:ministreaming')
api 'gnu.getopt:java-getopt:1.0.13'
api project(':apps:jetty')

// seems like it should be compileOnly but that doesn't work
implementation 'org.apache.ant:ant:1.10.14'
api fileTree("../jetty/apache-tomcat-${tomcatVersion}")
}

// Create the java files from the po files. The jar task will compile them.
Expand Down Expand Up @@ -159,12 +161,12 @@ task tempBeansJar(type: Jar) {
include '**/EditBean.class'
include '**/ui/*.class'
include '**/IndexBean.class'
baseName = 'temp-beans'
archiveBaseName = 'temp-beans'
}

// only for android
task uiJar(type: Jar) {
baseName = 'i2ptunnel-ui'
archiveBaseName = 'i2ptunnel-ui'
from sourceSets.main.output
include '**/ui/*.class'
manifest {
Expand All @@ -177,6 +179,7 @@ artifacts {
}

war {
duplicatesStrategy 'exclude'
include '**/EditBean.class'
include '**/ui/*.class'
include '**/IndexBean.class'
Expand Down
5 changes: 3 additions & 2 deletions apps/imagegen/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ sourceSets {
}

dependencies {
providedCompile project(':core')
providedCompile project(':apps:jetty')
implementation project(':core')
implementation project(':apps:jetty')
implementation fileTree("../jetty/apache-tomcat-${tomcatVersion}")
}

war {
Expand Down
54 changes: 29 additions & 25 deletions apps/jetty/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'java-library'
}

archivesBaseName = 'jetty-i2p'

sourceSets {
Expand All @@ -9,30 +13,30 @@ sourceSets {
}

dependencies {
ext.jettyVersion = '9.3.29.v20201019'
ext.jettyVersion = '9.3.30.v20211001'
ext.tomcatVersion = "${tomcatVersion}"
compile project(':core')
compile 'org.eclipse.jetty:jetty-http:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-io:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-security:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-server:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-servlet:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-util:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-xml:' + ext.jettyVersion
runtime 'org.eclipse.jetty:apache-jsp:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-continuation:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-deploy:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-jmx:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-rewrite:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-servlets:' + ext.jettyVersion
runtime 'org.eclipse.jetty:jetty-start:' + ext.jettyVersion
compile 'org.eclipse.jetty:jetty-webapp:' + ext.jettyVersion
compile 'org.apache.tomcat:tomcat-api:' + ext.tomcatVersion
runtime 'org.apache.tomcat:tomcat-el-api:' + ext.tomcatVersion
runtime 'org.apache.tomcat:tomcat-jasper:' + ext.tomcatVersion
runtime 'org.apache.tomcat:tomcat-jasper-el:' + ext.tomcatVersion
runtime 'org.apache.tomcat:tomcat-jsp-api:' + ext.tomcatVersion
runtime 'org.apache.tomcat:tomcat-juli:' + ext.tomcatVersion
runtime 'org.apache.tomcat:tomcat-util:' + ext.tomcatVersion
runtime 'org.apache.tomcat:tomcat-util-scan:' + ext.tomcatVersion
api project(':core')
api 'org.eclipse.jetty:jetty-http:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-io:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-security:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-server:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-servlet:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-util:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-xml:' + ext.jettyVersion
api 'org.eclipse.jetty:apache-jsp:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-continuation:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-deploy:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-jmx:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-rewrite:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-servlets:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-start:' + ext.jettyVersion
api 'org.eclipse.jetty:jetty-webapp:' + ext.jettyVersion
api 'org.apache.tomcat:tomcat-api:' + ext.tomcatVersion
api 'org.apache.tomcat:tomcat-el-api:' + ext.tomcatVersion
api 'org.apache.tomcat:tomcat-jasper:' + ext.tomcatVersion
api 'org.apache.tomcat:tomcat-jasper-el:' + ext.tomcatVersion
api 'org.apache.tomcat:tomcat-jsp-api:' + ext.tomcatVersion
api 'org.apache.tomcat:tomcat-juli:' + ext.tomcatVersion
api 'org.apache.tomcat:tomcat-util:' + ext.tomcatVersion
api 'org.apache.tomcat:tomcat-util-scan:' + ext.tomcatVersion
}
6 changes: 5 additions & 1 deletion apps/jrobin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'java-library'
}

sourceSets {
main {
java {
Expand All @@ -7,5 +11,5 @@ sourceSets {
}

dependencies {
compile project(':core')
api project(':core')
}
2 changes: 1 addition & 1 deletion apps/ministreaming/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ configurations {
tests
}
task testJar(type: Jar) {
baseName = 'mstreaming-test'
archiveBaseName = 'mstreaming-test'
dependsOn classes
from sourceSets.test.output
}
Expand Down
35 changes: 20 additions & 15 deletions apps/routerconsole/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
id 'java-library'
id 'war'
id 'scala'
}
Expand All @@ -15,21 +16,24 @@ sourceSets {
}

dependencies {
compile project(':core')
compile project(':router')
compile project(':installer')
compile 'gnu.getopt:java-getopt:1.0.13'

// below were providedCompile
providedCompile project(':apps:desktopgui')
providedCompile project(':apps:systray')
providedCompile project(':apps:jetty')
providedCompile project(':apps:jrobin')

implementation 'org.apache.ant:ant:1.10.10'
implementation fileTree("../jetty/apache-tomacat-${tomcatVersion}")
testCompile "org.scala-lang:scala-library:2.12.4"
testCompile 'org.scalatest:scalatest_2.12:3.0.4'
api project(':core')
api project(':router')
api project(':installer')
api 'gnu.getopt:java-getopt:1.0.13'

api project(':apps:desktopgui')
api project(':apps:systray')
api project(':apps:jetty')
api project(':apps:jrobin')
api files('../../installer/lib/wrapper/all/wrapper.jar')
api fileTree("../jetty/jetty-distribution-${jettyVersion}")

// seems like it should be compileOnly but that doesn't work
implementation 'org.apache.ant:ant:1.10.14'
api fileTree("../jetty/apache-tomcat-${tomcatVersion}")
// don't use 2.12.4, stack overflow: https://github.com/sbt/zinc/issues/1010
testImplementation "org.scala-lang:scala-library:2.12.5"
testImplementation 'org.scalatest:scalatest_2.12:3.0.4'
}

if (System.getenv("TARGET_JAVA_HOME") == null && JavaVersion.current() != JavaVersion.VERSION_1_7) {
Expand Down Expand Up @@ -173,6 +177,7 @@ war.dependsOn(bundle,precompileJsp)


war {
duplicatesStrategy 'exclude'
rootSpec.exclude('**/*.jar')
rootSpec.exclude('/com/vuze/**/*')
rootSpec.exclude('/edu/internet2/**/*')
Expand Down
10 changes: 7 additions & 3 deletions apps/sam/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'java-library'
}

sourceSets {
main {
java {
Expand All @@ -12,7 +16,7 @@ sourceSets {
}

dependencies {
compile project(':core')
compile project(':apps:ministreaming')
compile 'gnu.getopt:java-getopt:1.0.13'
api project(':core')
api project(':apps:ministreaming')
api 'gnu.getopt:java-getopt:1.0.13'
}
10 changes: 6 additions & 4 deletions apps/susidns/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ sourceSets {
}

dependencies {
providedCompile project(':core')
providedCompile project(':apps:jetty')
implementation project(':core')
implementation project(':apps:jetty')

implementation 'org.apache.ant:ant:1.10.10'
implementation fileTree("../jetty/apache-tomacat-${tomcatVersion}")
// seems like it should be compileOnly but that doesn't work
implementation 'org.apache.ant:ant:1.10.14'
implementation fileTree("../jetty/apache-tomcat-${tomcatVersion}")
implementation fileTree("../jetty/jetty-distribution-${jettyVersion}")
}

// Create the java files from the po files. The jar task will compile them.
Expand Down
5 changes: 3 additions & 2 deletions apps/susimail/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ sourceSets {
}

dependencies {
compile project(':core')
providedCompile project(':apps:jetty')
implementation project(':core')
implementation project(':apps:jetty')
}

// Create the java files from the po files. The jar task will compile them.
Expand All @@ -36,6 +36,7 @@ war {
webInf {
into 'classes'
from 'src/susimail.properties'
duplicatesStrategy 'include'
}
webXml = file('src/WEB-INF/web.xml')
}
Expand Down
6 changes: 5 additions & 1 deletion apps/systray/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'java-library'
}

sourceSets {
main {
java {
Expand All @@ -7,5 +11,5 @@ sourceSets {
}

dependencies {
compile project(':core')
api project(':core')
}
19 changes: 11 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ subprojects {
}

dependencies {
testCompile 'junit:junit:4.+'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'org.mockito:mockito-core:2.5.0'
// https://stackoverflow.com/questions/44493378/whats-the-difference-between-api-api-and-compile-in-gradle
testImplementation 'junit:junit:4.+'
testImplementation 'org.hamcrest:hamcrest-library:1.3'
testImplementation 'org.mockito:mockito-core:2.5.0'
}


Expand Down Expand Up @@ -118,14 +119,16 @@ task codeCoverageReport(type: JacocoReport) {
classDirectories.from(files(subprojects.sourceSets.main.output))
executionData.from(files(subprojects.jacocoTestReport.executionData))

doFirst {
executionData = files(executionData.findAll { it.exists() })
}
// > The value for this file collection is final and cannot be changed.
//doFirst {
// executionData = files(executionData.findAll { it.exists() })
//}

reports {
xml.enabled true
// https://stackoverflow.com/questions/73546718/changing-enabled-to-required-throws-an-error-in-gradle
xml.required.set(true)
xml.destination file("${buildDir}/reports/jacoco/report.xml")
html.enabled true
html.required.set(true)
html.destination file("${buildDir}/reports/jacoco/html")
}
}
Expand Down
Loading

0 comments on commit 8da5e01

Please sign in to comment.