From 3f5db1b19cc24f5d7f4c275ea3fbc20e4d572972 Mon Sep 17 00:00:00 2001 From: DaeHyun Sung Date: Sat, 22 Jan 2022 15:08:41 +0900 Subject: [PATCH] change gradle version(4.2.1 to 7.3.3) chagne gradle version - `4.2.1` to `7.3.3` change build.gradle files for gradle 7.x change Java version -`1.6` to `1.7` --- backend.ai-client-tester/build.gradle | 13 ++++++++----- backend.ai-client/build.gradle | 14 +++++++------- build.gradle | 11 ++++++----- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle | 3 +-- 5 files changed, 23 insertions(+), 20 deletions(-) diff --git a/backend.ai-client-tester/build.gradle b/backend.ai-client-tester/build.gradle index c9d7699..e5e74df 100644 --- a/backend.ai-client-tester/build.gradle +++ b/backend.ai-client-tester/build.gradle @@ -4,18 +4,21 @@ apply plugin: 'application' mainClassName = "ai.backend.clienttester.Main" dependencies { - compile project(':backend.ai-client') - compile group: 'commons-cli', name: 'commons-cli', version:'1.3.1' - compile 'commons-io:commons-io:2.6' + implementation project(':backend.ai-client') + implementation group: 'commons-cli', name: 'commons-cli', version:'1.3.1' + implementation 'commons-io:commons-io:2.6' + implementation 'com.google.code.gson:gson:2.8.9' } + jar { manifest { attributes 'Title': 'Backend.AI client lib tester', 'Version': version, 'Main-Class':'ai.backend.clienttester.Main' } - dependsOn configurations.runtime + dependsOn configurations.runtimeClasspath from { - configurations.compile.collect {it.isDirectory()? it: zipTree(it)} + configurations.runtimeClasspath.collect {it.isDirectory()? it: zipTree(it)} } + duplicatesStrategy = DuplicatesStrategy.EXCLUDE } run { if (project.hasProperty("appArgs")) { diff --git a/backend.ai-client/build.gradle b/backend.ai-client/build.gradle index 3e3c8a0..76f9a54 100644 --- a/backend.ai-client/build.gradle +++ b/backend.ai-client/build.gradle @@ -3,7 +3,6 @@ plugins { id 'java-library-distribution' } - jar { manifest { attributes 'Title': 'Backend.AI Client for Java', @@ -11,17 +10,18 @@ jar { 'Implementation-Version': version, 'Main-Class': 'ai.backend.client.Main' } - dependsOn configurations.runtime + dependsOn configurations.runtimeClasspath from { - configurations.compile.collect {it.isDirectory()? it: zipTree(it)} + configurations.runtimeClasspath.collect {it.isDirectory()? it: zipTree(it)} } } description = 'Backend.AI Client Library for Java' + dependencies { - compile 'com.google.code.gson:gson:2.8.2' - compile 'com.squareup.okhttp3:okhttp:3.9.1' - testCompile 'org.junit.jupiter:junit-jupiter-api:5.0.1' - testCompile 'junit:junit:4.12' + implementation 'com.google.code.gson:gson:2.8.9' + implementation 'com.squareup.okhttp3:okhttp:3.9.1' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.0.1' + testImplementation 'junit:junit:4.12' } diff --git a/build.gradle b/build.gradle index 3774c3b..4f914b5 100644 --- a/build.gradle +++ b/build.gradle @@ -1,17 +1,18 @@ allprojects { - apply plugin: 'maven' + apply plugin: 'maven-publish' group = 'ai.backend.client' version = '0.3' } subprojects { apply plugin: 'java' - sourceCompatibility = 1.6 - targetCompatibility = 1.6 + sourceCompatibility = 1.7 + targetCompatibility = 1.7 repositories { mavenLocal() - - maven { url "http://repo.maven.apache.org/maven2" } + mavenCentral() + + maven { url "https://repo.maven.apache.org/maven2" } } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3b62185..f5b8a8d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip diff --git a/settings.gradle b/settings.gradle index 75a11ef..060f391 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,6 +1,5 @@ rootProject.name = 'BackendAI-Java-SDK' -include ':backend.ai-client' -include ':backend.ai-client-tester' +include 'backend.ai-client', 'backend.ai-client-tester' project(':backend.ai-client').projectDir = "$rootDir/backend.ai-client" as File project(':backend.ai-client-tester').projectDir = "$rootDir/backend.ai-client-tester" as File