Skip to content

Commit

Permalink
upgrade gradle version to 7.3
Browse files Browse the repository at this point in the history
upgrade build jdk to jdk17
  • Loading branch information
cproof committed Sep 15, 2023
1 parent cdfc860 commit 53d41e3
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 73 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ on: [push]
jobs:
build:

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v1
- name: set up JDK 1.11
uses: actions/setup-java@v1
- uses: actions/checkout@v2
with:
java-version: 1.11
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
cache: maven
- name: Move `private` folder
run: mv private.sample private
- name: Build with Gradle
Expand Down
15 changes: 9 additions & 6 deletions RMBTClient/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ buildscript {
}

dependencies {
compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.5'
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.2'
compile group: 'net.sf.jopt-simple', name: 'jopt-simple', version: '5.0.4'
compile group: 'dnsjava', name: 'dnsjava', version: '2.1.8'
compile project(':RMBTSharedCode')
compile project(':RMBTUtil')
implementation group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.5'
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.2'
implementation group: 'net.sf.jopt-simple', name: 'jopt-simple', version: '5.0.4'
implementation group: 'dnsjava', name: 'dnsjava', version: '2.1.8'
implementation "org.json:json:$jsonVersion"
implementation group: 'com.google.code.gson', name: 'gson', version: "$gsonVersion"
implementation group: 'com.google.guava', name: 'guava', version: "$guavaVersion"
implementation project(':RMBTSharedCode')
implementation project(':RMBTUtil')

testImplementation group: 'org.jmockit', name: 'jmockit', version: '1.45'
testImplementation group: 'junit', name: 'junit', version: '4.12'
Expand Down
16 changes: 10 additions & 6 deletions RMBTControlServer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ project.webAppDirName = 'WebContent'

repositories {
mavenCentral()
maven{url 'http://maven.restlet.com'}
maven{url 'https://maven.restlet.talend.com'}
maven{url 'https://oss.sonatype.org/content/repositories/snapshots/'}
}

Expand All @@ -41,7 +41,7 @@ def generatedContextXmlFile = file("${buildDir}/context.xml")
dependencies {
providedCompile "org.apache.tomcat:tomcat-catalina:$catalinaVersion"
providedCompile "javax.servlet:javax.servlet-api:$servletVersion"
compile('commons-io:commons-io:2.4',
implementation('commons-io:commons-io:2.4',
"org.json:json:$jsonVersion",
"org.restlet.jse:org.restlet.ext.json:${restletVersion}",
"org.restlet.jee:org.restlet.ext.servlet:$restletVersion",
Expand All @@ -51,18 +51,21 @@ dependencies {
"com.fasterxml.jackson.core:jackson-databind:$jacksonVersion",
group: 'net.bull.javamelody', name: 'javamelody-core', version: "$javaMelodyVersion"
)
testCompile 'net.sf.uadetector:uadetector-resources:2014.10'
compile project(':RMBTSharedCode')
compile project(':RMBTUtil')
implementation group: 'com.google.code.gson', name: 'gson', version: "$gsonVersion"
implementation group: 'com.google.guava', name: 'guava', version: "$guavaVersion"
implementation group: 'joda-time', name: 'joda-time', version: '2.9.7'
testImplementation 'net.sf.uadetector:uadetector-resources:2014.10'
implementation project(':RMBTSharedCode')
implementation project(':RMBTUtil')
}


war {
webXml = webXmlFile
exclude 'WEB-INF/web.xml'
exclude 'WEB-INF/lib/**'
exclude 'WEB-INF/classes/**'
exclude 'META-INF/context.xml'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(buildDir){
into('META-INF')
include 'context.xml'
Expand All @@ -72,6 +75,7 @@ war {

def revisionPropertiesFile = file("${buildDir}/resources/main/revision.properties")
processResources {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
doLast {
String revisionProperties = "git.describe=" + getVersionNameFromGit() + "\n"
revisionProperties = revisionProperties + "git.branch=" + getBranchFromGit() + "\n"
Expand Down
20 changes: 12 additions & 8 deletions RMBTMapServer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ project.webAppDirName = 'WebContent'

repositories {
mavenCentral()
maven{url 'http://maven.restlet.com'}
maven{url 'https://maven.restlet.talend.com'}
maven{url 'https://oss.sonatype.org/content/repositories/snapshots/'}
}

Expand All @@ -34,20 +34,24 @@ subprojects{
dependencies {
providedCompile "org.apache.tomcat:tomcat-catalina:$catalinaVersion"
providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version: "$servletVersion"
compile "org.json:json:$jsonVersion"
compile "org.restlet.jse:org.restlet.ext.json:$restletVersion"
compile "org.restlet.jee:org.restlet.ext.servlet:$restletVersion"
compile 'org.postgis:postgis-jdbc:1.3.3'
compile(group: 'net.bull.javamelody', name: 'javamelody-core', version: "$javaMelodyVersion")
compile project(':RMBTSharedCode')
compile project(':RMBTUtil')
implementation "org.json:json:$jsonVersion"
implementation "org.restlet.jse:org.restlet.ext.json:$restletVersion"
implementation "org.restlet.jee:org.restlet.ext.servlet:$restletVersion"
implementation group: 'com.google.code.gson', name: 'gson', version: "$gsonVersion"
implementation group: 'com.google.guava', name: 'guava', version: "$guavaVersion"
implementation group: 'net.spy', name: 'spymemcached', version: '2.12.1'
implementation 'org.postgis:postgis-jdbc:1.3.3'
implementation(group: 'net.bull.javamelody', name: 'javamelody-core', version: "$javaMelodyVersion")
implementation project(':RMBTSharedCode')
implementation project(':RMBTUtil')
}


war {
exclude 'WEB-INF/lib/**'
exclude 'WEB-INF/classes/**'
exclude 'META-INF/context.xml'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(buildDir){
into('META-INF')
include 'context.xml'
Expand Down
19 changes: 11 additions & 8 deletions RMBTQoSServer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,32 @@ tasks.withType(JavaCompile) {

repositories {
mavenCentral()
maven{url 'http://maven.restlet.com'}
maven{url 'https://maven.restlet.talend.com'}
}



dependencies {
compile project(':RMBTUtil')
compile project(':RMBTSharedCode')
compile 'org.jumpmind.symmetric.jdbc:postgresql:9.2-1002-jdbc4'
compile 'org.apache.logging.log4j:log4j-core:2.16.0'
compile "org.json:json:$jsonVersion"
compile "org.restlet.jse:org.restlet:$restletVersion"
implementation project(':RMBTUtil')
implementation project(':RMBTSharedCode')
implementation 'org.jumpmind.symmetric.jdbc:postgresql:9.2-1002-jdbc4'
implementation 'org.apache.logging.log4j:log4j-core:2.16.0'
implementation "org.json:json:$jsonVersion"
implementation "org.restlet.jse:org.restlet:$restletVersion"
implementation group: 'com.google.code.gson', name: 'gson', version: "$gsonVersion"
implementation group: 'com.google.guava', name: 'guava', version: "$guavaVersion"

testImplementation group: 'org.jmockit', name: 'jmockit', version: '1.45'
testImplementation group: 'junit', name: 'junit', version: '4.12'
}

jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
from(rootProject.file("private/qosserver.jks"),{
into('/crt')
})
manifest { attributes 'Main-Class': 'at.rtr.rmbt.qos.testserver.TestServer' }
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

task wrapper(type: Wrapper) {
Expand Down
28 changes: 14 additions & 14 deletions RMBTSharedCode/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ repositories {


dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
compile group: 'dnsjava', name: 'dnsjava', version: '2.1.7'
compile group: 'net.spy', name: 'spymemcached', version: '2.12.1'
compile group: 'joda-time', name: 'joda-time', version: '2.9.7'
testCompile group: 'junit', name: 'junit', version: '4.11'
compile group: 'org.postgresql', name: 'postgresql', version: '42.2.18'
compile group: 'com.google.guava', name: 'guava', version: '20.0'
testImplementation group: 'junit', name: 'junit', version: '4.11'
implementation group: 'dnsjava', name: 'dnsjava', version: '2.1.7'
implementation group: 'net.spy', name: 'spymemcached', version: '2.12.1'
implementation group: 'joda-time', name: 'joda-time', version: '2.9.7'
testImplementation group: 'junit', name: 'junit', version: '4.11'
implementation group: 'org.postgresql', name: 'postgresql', version: '42.2.18'
implementation group: 'com.google.guava', name: 'guava', version: "$guavaVersion"
providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version: "$servletVersion"
compile "org.json:json:$jsonVersion"
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
compile group: 'com.github.jknack', name: 'handlebars', version: '4.1.2'
implementation "org.json:json:$jsonVersion"
implementation group: 'com.google.code.gson', name: 'gson', version: "$gsonVersion"
implementation group: 'com.github.jknack', name: 'handlebars', version: '4.1.2'

compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: "$jacksonVersion"
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: "$jacksonVersion"
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "$jacksonVersion"
compile 'com.maxmind.geoip2:geoip2:2.15.0'
compile 'io.swagger:swagger-annotations:1.5.15'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "$jacksonVersion"
implementation 'com.maxmind.geoip2:geoip2:2.15.0'
implementation 'io.swagger:swagger-annotations:1.5.15'
}

sourceSets {
Expand Down
45 changes: 26 additions & 19 deletions RMBTStatisticServer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ project.webAppDirName = 'WebContent'

repositories {
mavenCentral()
maven{url 'http://maven.restlet.com'}
maven{url 'https://maven.restlet.talend.com'}
maven{url 'https://oss.sonatype.org/content/repositories/snapshots/'}
maven { url 'https://jitpack.io' }
}
Expand Down Expand Up @@ -54,33 +54,39 @@ def generatedContextXmlFile = file("${buildDir}/context.xml")
dependencies {
providedCompile "org.apache.tomcat:tomcat-catalina:$catalinaVersion"
providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version: "$servletVersion"
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile 'org.mockito:mockito-core:2.7.17'
compile "org.restlet.jse:org.restlet:$restletVersion"
compile "org.restlet.jse:org.restlet.ext.json:$restletVersion"
compile "org.restlet.jee:org.restlet.ext.servlet:$restletVersion"
compile "org.restlet.jee:org.restlet.ext.fileupload:$restletVersion"
compile "org.json:json:$jsonVersion"
compile 'commons-io:commons-io:2.4'
compile 'org.apache.jcs:jcs:1.3'
compile "io.swagger:swagger-annotations:1.5.24"
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation 'org.mockito:mockito-core:2.7.17'
implementation "org.restlet.jse:org.restlet:$restletVersion"
implementation "org.restlet.jse:org.restlet.ext.json:$restletVersion"
implementation "org.restlet.jee:org.restlet.ext.servlet:$restletVersion"
implementation "org.restlet.jee:org.restlet.ext.fileupload:$restletVersion"
implementation "org.json:json:$jsonVersion"
implementation 'commons-io:commons-io:2.4'
implementation 'org.apache.jcs:jcs:1.3'
implementation "io.swagger:swagger-annotations:1.5.24"
//compile 'io.swagger:swagger-core:1.5.15'
compile 'javax.ws.rs:javax.ws.rs-api:2.0.1'
compile "com.fasterxml.jackson:jackson-base:$jacksonVersion"
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-csv:$jacksonVersion"
implementation 'javax.ws.rs:javax.ws.rs-api:2.0.1'
implementation "com.fasterxml.jackson:jackson-base:$jacksonVersion"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-csv:$jacksonVersion"
implementation group: 'de.grundid.opendatalab', name: 'geojson-jackson', version: '1.14'
compile group: 'commons-dbutils', name: 'commons-dbutils', version: "$dbUtilsVersion"
compile "com.github.sett4:jackson-dataformat-xlsx-lite:2.9.10.1"
compile (group: 'net.bull.javamelody', name: 'javamelody-core', version: "$javaMelodyVersion")
compile project(':RMBTSharedCode')
compile project(':RMBTUtil')
implementation group: 'commons-dbutils', name: 'commons-dbutils', version: "$dbUtilsVersion"
implementation "com.github.sett4:jackson-dataformat-xlsx-lite:2.9.10.1"
implementation (group: 'net.bull.javamelody', name: 'javamelody-core', version: "$javaMelodyVersion")
implementation group: 'com.google.code.gson', name: 'gson', version: "$gsonVersion"
implementation group: 'com.google.guava', name: 'guava', version: "$guavaVersion"
implementation group: 'com.github.jknack', name: 'handlebars', version: '4.1.2'
implementation group: 'joda-time', name: 'joda-time', version: '2.9.7'
implementation group: 'net.spy', name: 'spymemcached', version: '2.12.1'
implementation project(':RMBTSharedCode')
implementation project(':RMBTUtil')
}


war {
exclude 'WEB-INF/lib/**'
exclude 'WEB-INF/classes/**'
exclude 'META-INF/context.xml'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(buildDir){
into('META-INF')
include 'context.xml'
Expand Down Expand Up @@ -121,6 +127,7 @@ swagger {

def revisionPropertiesFile = file("${buildDir}/resources/main/revision.properties")
processResources {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
doLast {
String revisionProperties = "git.describe=" + getVersionNameFromGit() + "\n"
revisionProperties = revisionProperties + "git.branch=" + getBranchFromGit() + "\n"
Expand Down
6 changes: 3 additions & 3 deletions RMBTUtil/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repositories {


dependencies {
testCompile group: 'junit', name: 'junit', version: '4.13.2'
compile group: 'org.json', name: 'json', version: "$jsonVersion"
compile group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
implementation group: 'org.json', name: 'json', version: "$jsonVersion"
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
}
3 changes: 0 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ buildscript {
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}

def getVersionNameFromGit() {
Expand Down
2 changes: 2 additions & 0 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ ext {
jsonVersion = '20220924'
javaMelodyVersion = '1.91.0'
dbUtilsVersion = '1.7'
guavaVersion = '20.0'
gsonVersion = '2.8.0'
}


2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Sat Jan 11 20:24:04 CET 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down

0 comments on commit 53d41e3

Please sign in to comment.