summaryrefslogtreecommitdiff
path: root/java/test
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2018-11-19 16:16:41 -0500
committerBernard Normier <bernard@zeroc.com>2018-11-19 16:16:41 -0500
commite11434f61a24f645d94c0757ab3c5ad0ab5c56d4 (patch)
tree60d0d1960775f50abd15b61217103b130dbdfb22 /java/test
parentIncrease retries to work with slower machines (diff)
downloadice-e11434f61a24f645d94c0757ab3c5ad0ab5c56d4.tar.bz2
ice-e11434f61a24f645d94c0757ab3c5ad0ab5c56d4.tar.xz
ice-e11434f61a24f645d94c0757ab3c5ad0ab5c56d4.zip
Updated gradle build system.
Diffstat (limited to 'java/test')
-rw-r--r--java/test/android/controller/build.gradle45
-rw-r--r--java/test/android/controller/gradle.properties30
-rw-r--r--java/test/build.gradle22
-rw-r--r--java/test/plugins/build.gradle2
4 files changed, 34 insertions, 65 deletions
diff --git a/java/test/android/controller/build.gradle b/java/test/android/controller/build.gradle
index ad434c259e3..67eec528808 100644
--- a/java/test/android/controller/build.gradle
+++ b/java/test/android/controller/build.gradle
@@ -17,20 +17,20 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
- classpath "gradle.plugin.com.zeroc.gradle.ice-builder:slice:1.4.5"
+ classpath 'gradle.plugin.com.zeroc.gradle.ice-builder:slice:1.4.5'
}
}
apply plugin: 'com.android.application'
-apply plugin: "com.zeroc.gradle.ice-builder.slice"
+apply plugin: 'com.zeroc.gradle.ice-builder.slice'
slice {
output = file("${project.buildDir}/generated/source/ice")
- cppConfiguration = this.cppConfiguration
- cppPlatform = this.cppPlatform
+ cppConfiguration = project.cppConfiguration
+ cppPlatform = project.cppPlatform
if(!System.env.ICE_BIN_DIST?.split(" ").find{ it == 'all' || it.contains('java')}) {
- iceHome = this.hasProperty('iceHome') ? this.iceHome
- : System.getenv("ICE_HOME") != null ? System.env.ICE_HOME : new File("$rootProject.projectDir/../../../..").getCanonicalPath()
+ iceHome = project.hasProperty('iceHome') ? project.iceHome
+ : System.getenv("ICE_HOME") != null ? System.env.ICE_HOME : new File("$rootProject.projectDir/../../../..").getCanonicalPath()
}
java {
files = fileTree(dir: "$rootProject.projectDir/../../../../scripts/", includes: ['*.ice'])
@@ -38,17 +38,24 @@ slice {
}
repositories {
- jcenter()
+ if(slice.jarDir != null) {
+ flatDir {
+ name "local"
+ dirs slice.jarDir
+ }
+ }
+
google()
+ jcenter()
}
android {
- compileSdkVersion ice_compileSdkVersion.toInteger()
+ compileSdkVersion 24
defaultConfig {
applicationId "com.zeroc.testcontroller"
- minSdkVersion ice_minSdkVersion.toInteger()
- targetSdkVersion ice_targetSdkVersion.toInteger()
+ minSdkVersion 24
+ targetSdkVersion 24
multiDexEnabled true // Necessary otherwise we'd exceed the 64K DEX limit.
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
@@ -85,20 +92,12 @@ clean {
delete("src/main/res/raw/server.bks")
}
-ext.localDependency = { artifact ->
- if(project.slice.srcDist || System.env.ICE_BIN_DIST == "cpp") {
- return files("${rootProject.projectDir}/../../../lib/${artifact}-${iceVersion}.jar")
- }
- else {
- return "com.zeroc:${artifact}:${iceVersion}"
- }
-}
dependencies {
- implementation localDependency("glacier2")
- implementation localDependency("ice")
- implementation localDependency("icessl")
- implementation localDependency("icediscovery")
- implementation localDependency("icebt")
+ implementation "com.zeroc:glacier2:${project.iceVersion}"
+ implementation "com.zeroc:ice:${project.iceVersion}"
+ implementation "com.zeroc:icessl:${project.iceVersion}"
+ runtimeOnly "com.zeroc:icediscovery:${project.iceVersion}"
+ runtimeOnly "com.zeroc:icebt:${project.iceVersion}"
implementation files("${rootProject.projectDir}/../../../lib/test.jar")
runtimeOnly "org.apache.commons:commons-compress:1.14"
diff --git a/java/test/android/controller/gradle.properties b/java/test/android/controller/gradle.properties
index 9b9380af758..6fbfb18e1d4 100644
--- a/java/test/android/controller/gradle.properties
+++ b/java/test/android/controller/gradle.properties
@@ -12,11 +12,6 @@
//
iceVersion = 3.7.2
-// The Android versions used for the Ice build.
-ice_compileSdkVersion = 25
-ice_minSdkVersion = 24
-ice_targetSdkVersion = 24
-
//
// Set iceHome to location of Ice installation if Ice was installed in a
// non-standard location. You must use forward slashes in the path, even on
@@ -25,37 +20,12 @@ ice_targetSdkVersion = 24
// iceHome =
//
-// Set the version of the Ice Builder to use for building. It must be set to debian
-// when using the gradle-ice-builder-plugin package on Debian.
-//
-iceBuilderVersion = 1.4.5
-
-//
-// Set the builder artifact class path. It must be set to com.zeroc.gradle.ice-builder
-// when using the gradle-ice-builder-plugin package.
-//
-iceBuilderClassPath = gradle.plugin.com.zeroc.gradle.ice-builder
-
-//
-// Set the location of a local Ice Builder for Gradle source directory
-//
-iceBuilderHome =
-
-//
// Gradle build properties
//
org.gradle.daemon = true
org.gradle.configureondemand=false
//
-// Package build properties
-//
-DESTDIR =
-appendVersionSuffix = yes
-prefix =
-debug = true
-
-//
// Windows specific options
//
diff --git a/java/test/build.gradle b/java/test/build.gradle
index 4c18dda764e..f82c6d13355 100644
--- a/java/test/build.gradle
+++ b/java/test/build.gradle
@@ -22,20 +22,20 @@ sourceSets {
}
dependencies {
- compile localDependency('ice')
- compile localDependency('icessl')
- compile localDependency('icediscovery')
- compile localDependency('icelocatordiscovery')
- compile localDependency('icebox')
- compile localDependency('glacier2')
- compile localDependency('icestorm')
- compile localDependency('icegrid')
- compile project(':testPlugins')
+ implementation localDependency('ice')
+ implementation localDependency('icessl')
+ runtimeOnly localDependency('icediscovery')
+ runtimeOnly localDependency('icelocatordiscovery')
+ implementation localDependency('icebox')
+ implementation localDependency('glacier2')
+ implementation localDependency('icestorm')
+ implementation localDependency('icegrid')
+ runtimeOnly project(':testPlugins')
}
if(!gradle.startParameter.isOffline()) {
dependencies {
- runtime "org.apache.commons:commons-compress:1.14"
+ runtimeOnly "org.apache.commons:commons-compress:1.14"
}
}
@@ -43,7 +43,7 @@ jar {
archiveName = "test.jar"
destinationDir = new File("$rootProject.projectDir/lib/")
manifest {
- attributes("Class-Path": configurations.runtime.resolve().collect { it.toURI() }.join(' '))
+ attributes("Class-Path": configurations.runtimeClasspath.resolve().collect { it.toURI() }.join(' '))
}
}
diff --git a/java/test/plugins/build.gradle b/java/test/plugins/build.gradle
index aff1a6059af..82cf6bd3012 100644
--- a/java/test/plugins/build.gradle
+++ b/java/test/plugins/build.gradle
@@ -19,7 +19,7 @@ sourceSets {
}
dependencies {
- compile localDependency('ice')
+ implementation localDependency('ice')
}
jar {