From 8a17a3a4eb5ebd79d126321b638499a9155bcd8e Mon Sep 17 00:00:00 2001 From: Mark Spruiell Date: Wed, 19 Jul 2017 14:02:50 -0700 Subject: [PATCH] ICE-8362 - simplify Android demo projects --- java-compat/android/chat/build.gradle | 16 ++++++++-------- java-compat/android/gradle.properties | 17 +++++++++++------ java-compat/android/gradle/ice.gradle | 11 ++++++++--- java-compat/android/hello/build.gradle | 14 +++++++------- java-compat/android/library/build.gradle | 12 ++++++------ java-compat/android/mtalk/build.gradle | 14 +++++++------- java-compat/android/talk/build.gradle | 16 ++++++++-------- java-compat/gradle/ice.gradle | 6 ++---- java/android/chat/build.gradle | 14 +++++++------- java/android/gradle.properties | 13 ++++++------- java/android/gradle/ice.gradle | 11 ++++++++--- java/android/hello/build.gradle | 12 ++++++------ java/android/library/build.gradle | 14 +++++++------- java/android/mtalk/build.gradle | 12 ++++++------ java/android/talk/build.gradle | 14 +++++++------- 15 files changed, 104 insertions(+), 92 deletions(-) mode change 100644 => 100755 java-compat/android/chat/build.gradle diff --git a/java-compat/android/chat/build.gradle b/java-compat/android/chat/build.gradle old mode 100644 new mode 100755 index 02512a653..4df93b821 --- a/java-compat/android/chat/build.gradle +++ b/java-compat/android/chat/build.gradle @@ -19,16 +19,16 @@ slice { } android { - compileSdkVersion ice_compileSdkVersion.toInteger() - buildToolsVersion ice_buildToolsVersion + compileSdkVersion 21 + buildToolsVersion "25.0.3" defaultConfig { applicationId "com.zeroc.chat" - minSdkVersion ice_minSdkVersion.toInteger() - targetSdkVersion ice_targetSdkVersion.toInteger() + minSdkVersion 21 + targetSdkVersion 21 compileOptions { - sourceCompatibility JavaVersion.VERSION_1_6 - targetCompatibility JavaVersion.VERSION_1_6 + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 } } @@ -59,6 +59,6 @@ clean { } dependencies { - compile localDependency('ice-compat') - compile localDependency('glacier2-compat') + compile 'com.zeroc:ice-compat:3.7.0' + compile 'com.zeroc:glacier2-compat:3.7.0' } diff --git a/java-compat/android/gradle.properties b/java-compat/android/gradle.properties index dd8e78f9f..4b193ee89 100644 --- a/java-compat/android/gradle.properties +++ b/java-compat/android/gradle.properties @@ -6,12 +6,6 @@ iceVersion = 3.7.0 -// The Android versions used for the Ice build. -ice_buildToolsVersion = 25.0.3 -ice_compileSdkVersion = 21 -ice_minSdkVersion = 21 -ice_targetSdkVersion = 21 - // // 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 @@ -25,6 +19,12 @@ iceHome = // iceBuilderVersion = 1.4.1 +// +// Set the builder artifact class path. It must be set to com.zeroc.gradle.ice-builder +// when using the gradle-ice-builder-plugin package on Debian. +// +iceBuilderClassPath = gradle.plugin.com.zeroc.gradle.ice-builder + // // Set the location of a local Ice Builder for Gradle source directory // @@ -52,3 +52,8 @@ cppPlatform = // directory. // cppConfiguration = + +// +// Development +// +devRepo = diff --git a/java-compat/android/gradle/ice.gradle b/java-compat/android/gradle/ice.gradle index ef0bb5bcf..b157e43cf 100644 --- a/java-compat/android/gradle/ice.gradle +++ b/java-compat/android/gradle/ice.gradle @@ -1,4 +1,3 @@ - apply from: "$rootProject.projectDir/../gradle/ice.gradle" project.version = slice.iceVersion @@ -8,16 +7,22 @@ slice.compat = true repositories { if (slice.jarDir != null) { flatDir { - name "local" + name "local" dirs slice.jarDir } } if (!useLocalOnly) { + if(this.devRepo) { + maven { + url this.devRepo + } + } + mavenCentral() maven { - url "https://${iceMavenRepo}/nexus/content/repositories/releases" + url "https://repo.zeroc.com/nexus/content/repositories/releases" } } } diff --git a/java-compat/android/hello/build.gradle b/java-compat/android/hello/build.gradle index 00513ee66..ee52e91b6 100644 --- a/java-compat/android/hello/build.gradle +++ b/java-compat/android/hello/build.gradle @@ -18,16 +18,16 @@ slice { } android { - compileSdkVersion ice_compileSdkVersion.toInteger() - buildToolsVersion ice_buildToolsVersion + compileSdkVersion 21 + buildToolsVersion "25.0.3" defaultConfig { applicationId "com.zeroc.hello" - minSdkVersion ice_minSdkVersion.toInteger() - targetSdkVersion ice_targetSdkVersion.toInteger() + minSdkVersion 21 + targetSdkVersion 21 compileOptions { - sourceCompatibility JavaVersion.VERSION_1_6 - targetCompatibility JavaVersion.VERSION_1_6 + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 } } @@ -58,5 +58,5 @@ clean { } dependencies { - compile localDependency('ice-compat') + compile 'com.zeroc:ice-compat:3.7.0' } diff --git a/java-compat/android/library/build.gradle b/java-compat/android/library/build.gradle index 3908ca839..f6da57a47 100644 --- a/java-compat/android/library/build.gradle +++ b/java-compat/android/library/build.gradle @@ -19,13 +19,13 @@ slice { } android { - compileSdkVersion ice_compileSdkVersion.toInteger() - buildToolsVersion ice_buildToolsVersion + compileSdkVersion 21 + buildToolsVersion "25.0.3" defaultConfig { applicationId "com.zeroc.library" - minSdkVersion ice_minSdkVersion.toInteger() - targetSdkVersion ice_targetSdkVersion.toInteger() + minSdkVersion 21 + targetSdkVersion 21 compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 @@ -59,6 +59,6 @@ clean { } dependencies { - compile localDependency('ice-compat') - compile localDependency('glacier2-compat') + compile 'com.zeroc:ice-compat:3.7.0' + compile 'com.zeroc:glacier2-compat:3.7.0' } diff --git a/java-compat/android/mtalk/build.gradle b/java-compat/android/mtalk/build.gradle index 41180eee1..832154f6f 100644 --- a/java-compat/android/mtalk/build.gradle +++ b/java-compat/android/mtalk/build.gradle @@ -18,16 +18,16 @@ slice { } android { - compileSdkVersion ice_compileSdkVersion.toInteger() - buildToolsVersion ice_buildToolsVersion + compileSdkVersion 21 + buildToolsVersion "25.0.3" defaultConfig { applicationId "com.zeroc.mtalk" - minSdkVersion ice_minSdkVersion.toInteger() - targetSdkVersion ice_targetSdkVersion.toInteger() + minSdkVersion 21 + targetSdkVersion 21 compileOptions { - sourceCompatibility JavaVersion.VERSION_1_6 - targetCompatibility JavaVersion.VERSION_1_6 + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 } } @@ -62,5 +62,5 @@ clean { } dependencies { - compile localDependency('ice-compat') + compile 'com.zeroc:ice-compat:3.7.0' } diff --git a/java-compat/android/talk/build.gradle b/java-compat/android/talk/build.gradle index 075bfa239..55a851811 100644 --- a/java-compat/android/talk/build.gradle +++ b/java-compat/android/talk/build.gradle @@ -18,16 +18,16 @@ slice { } android { - compileSdkVersion ice_compileSdkVersion.toInteger() - buildToolsVersion ice_buildToolsVersion + compileSdkVersion 21 + buildToolsVersion "25.0.3" defaultConfig { applicationId "com.zeroc.talk" - minSdkVersion ice_minSdkVersion.toInteger() - targetSdkVersion ice_targetSdkVersion.toInteger() + minSdkVersion 21 + targetSdkVersion 21 compileOptions { - sourceCompatibility JavaVersion.VERSION_1_6 - targetCompatibility JavaVersion.VERSION_1_6 + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 } } @@ -52,6 +52,6 @@ android { } dependencies { - compile localDependency('ice-compat') - compile localDependency('icebt-compat') + compile 'com.zeroc:ice-compat:3.7.0' + compile 'com.zeroc:icebt-compat:3.7.0' } diff --git a/java-compat/gradle/ice.gradle b/java-compat/gradle/ice.gradle index 1605de083..7e4f0199b 100644 --- a/java-compat/gradle/ice.gradle +++ b/java-compat/gradle/ice.gradle @@ -48,10 +48,8 @@ buildscript { } repositories { - if (!useLocalOnly) { - maven { - url "https://${iceMavenRepo}/nexus/content/repositories/releases" - } + maven { + url "https://plugins.gradle.org/m2/" } } diff --git a/java/android/chat/build.gradle b/java/android/chat/build.gradle index 09218831d..29037d627 100644 --- a/java/android/chat/build.gradle +++ b/java/android/chat/build.gradle @@ -19,13 +19,13 @@ slice { } android { - compileSdkVersion ice_compileSdkVersion.toInteger() - buildToolsVersion ice_buildToolsVersion + compileSdkVersion 24 + buildToolsVersion "26.0.0" defaultConfig { applicationId "com.zeroc.chat" - minSdkVersion ice_minSdkVersion.toInteger() - targetSdkVersion ice_targetSdkVersion.toInteger() + minSdkVersion 24 + targetSdkVersion 24 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 @@ -59,7 +59,7 @@ clean { } dependencies { - compile localDependency('ice') - compile localDependency('icessl') - compile localDependency('glacier2') + implementation 'com.zeroc:ice:3.7.0' + implementation 'com.zeroc:icessl:3.7.0' + implementation 'com.zeroc:glacier2:3.7.0' } diff --git a/java/android/gradle.properties b/java/android/gradle.properties index d430aeaa3..26e39377d 100644 --- a/java/android/gradle.properties +++ b/java/android/gradle.properties @@ -6,12 +6,6 @@ iceVersion = 3.7.0 -// The Android versions used for the Ice build. -ice_buildToolsVersion = 26.0.0 -ice_compileSdkVersion = 25 -ice_minSdkVersion = 25 -ice_targetSdkVersion = 25 - // // 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 @@ -26,7 +20,7 @@ iceHome = iceBuilderVersion = 1.4.1 // -// Set the builder artifact class path it must be set to com.zeroc.gradle.ice-builder +// 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 @@ -58,3 +52,8 @@ cppPlatform = // directory. // cppConfiguration = + +// +// Development +// +devRepo = diff --git a/java/android/gradle/ice.gradle b/java/android/gradle/ice.gradle index 1a2234086..fef62f074 100644 --- a/java/android/gradle/ice.gradle +++ b/java/android/gradle/ice.gradle @@ -1,20 +1,25 @@ - apply from: "$rootProject.projectDir/../gradle/ice.gradle" project.version = slice.iceVersion repositories { if (slice.jarDir != null) { flatDir { - name "local" + name "local" dirs slice.jarDir } } if (!useLocalOnly) { + if(this.devRepo) { + maven { + url this.devRepo + } + } + mavenCentral() maven { - url "https://${iceMavenRepo}/nexus/content/repositories/releases" + url "https://repo.zeroc.com/nexus/content/repositories/releases" } } } diff --git a/java/android/hello/build.gradle b/java/android/hello/build.gradle index 3192dc8f1..9d16ddb3f 100644 --- a/java/android/hello/build.gradle +++ b/java/android/hello/build.gradle @@ -18,13 +18,13 @@ slice { } android { - compileSdkVersion ice_compileSdkVersion.toInteger() - buildToolsVersion ice_buildToolsVersion + compileSdkVersion 24 + buildToolsVersion "26.0.0" defaultConfig { applicationId "com.zeroc.hello" - minSdkVersion ice_minSdkVersion.toInteger() - targetSdkVersion ice_targetSdkVersion.toInteger() + minSdkVersion 24 + targetSdkVersion 24 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 @@ -58,6 +58,6 @@ clean { } dependencies { - compile localDependency('ice') - compile localDependency('icessl') + implementation 'com.zeroc:ice:3.7.0' + implementation 'com.zeroc:icessl:3.7.0' } diff --git a/java/android/library/build.gradle b/java/android/library/build.gradle index 70670af1d..fbe365dd5 100644 --- a/java/android/library/build.gradle +++ b/java/android/library/build.gradle @@ -19,13 +19,13 @@ slice { } android { - compileSdkVersion ice_compileSdkVersion.toInteger() - buildToolsVersion ice_buildToolsVersion + compileSdkVersion 24 + buildToolsVersion "26.0.0" defaultConfig { applicationId "com.zeroc.library" - minSdkVersion ice_minSdkVersion.toInteger() - targetSdkVersion ice_targetSdkVersion.toInteger() + minSdkVersion 24 + targetSdkVersion 24 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 @@ -59,7 +59,7 @@ clean { } dependencies { - compile localDependency('ice') - compile localDependency('icessl') - compile localDependency('glacier2') + implementation 'com.zeroc:ice:3.7.0' + implementation 'com.zeroc:icessl:3.7.0' + implementation 'com.zeroc:glacier2:3.7.0' } diff --git a/java/android/mtalk/build.gradle b/java/android/mtalk/build.gradle index c8084d295..8178c2cae 100644 --- a/java/android/mtalk/build.gradle +++ b/java/android/mtalk/build.gradle @@ -18,13 +18,13 @@ slice { } android { - compileSdkVersion ice_compileSdkVersion.toInteger() - buildToolsVersion ice_buildToolsVersion + compileSdkVersion 24 + buildToolsVersion "26.0.0" defaultConfig { applicationId "com.zeroc.mtalk" - minSdkVersion ice_minSdkVersion.toInteger() - targetSdkVersion ice_targetSdkVersion.toInteger() + minSdkVersion 24 + targetSdkVersion 24 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 @@ -62,6 +62,6 @@ clean { } dependencies { - compile localDependency('ice') - compile localDependency('icessl') + implementation 'com.zeroc:ice:3.7.0' + implementation 'com.zeroc:icessl:3.7.0' } diff --git a/java/android/talk/build.gradle b/java/android/talk/build.gradle index c3efdb330..2908cf9a4 100644 --- a/java/android/talk/build.gradle +++ b/java/android/talk/build.gradle @@ -18,13 +18,13 @@ slice { } android { - compileSdkVersion ice_compileSdkVersion.toInteger() - buildToolsVersion ice_buildToolsVersion + compileSdkVersion 24 + buildToolsVersion "26.0.0" defaultConfig { applicationId "com.zeroc.talk" - minSdkVersion ice_minSdkVersion.toInteger() - targetSdkVersion ice_targetSdkVersion.toInteger() + minSdkVersion 24 + targetSdkVersion 24 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 @@ -62,7 +62,7 @@ clean { } dependencies { - compile localDependency('ice') - compile localDependency('icessl') - compile localDependency('icebt') + implementation 'com.zeroc:ice:3.7.0' + implementation 'com.zeroc:icessl:3.7.0' + implementation 'com.zeroc:icebt:3.7.0' }