Permalink
Browse files

Upgrade build tool dependencies. (#5965)

  • Loading branch information...
cmelchior committed Sep 16, 2018
1 parent b32b800 commit a1cbe18982052cc04766b32af9ce1c0c8ecbb239
Showing with 329 additions and 291 deletions.
  1. +1 −1 README.md
  2. +5 −0 dependencies.list
  3. +6 −6 examples/architectureComponentsExample/build.gradle
  4. +4 −2 examples/build.gradle
  5. +4 −4 examples/gradle.properties
  6. BIN examples/gradle/wrapper/gradle-wrapper.jar
  7. +1 −1 examples/gradle/wrapper/gradle-wrapper.properties
  8. +1 −1 examples/multiprocessExample/build.gradle
  9. +2 −2 examples/newsreaderExample/build.gradle
  10. +2 −2 examples/objectServerExample/build.gradle
  11. +3 −3 examples/rxJavaExample/build.gradle
  12. +1 −1 examples/secureTokenAndroidKeyStore/build.gradle
  13. +1 −2 examples/threadExample/build.gradle
  14. +2 −2 examples/threadExample/src/main/java/io/realm/examples/threads/ReceivingActivity.java
  15. +2 −2 examples/threadExample/src/main/java/io/realm/examples/threads/ThreadExampleActivity.java
  16. +12 −6 examples/unitTestExample/build.gradle
  17. +5 −2 gradle-plugin/build.gradle
  18. BIN gradle-plugin/gradle/wrapper/gradle-wrapper.jar
  19. +1 −1 gradle-plugin/gradle/wrapper/gradle-wrapper.properties
  20. +5 −2 gradle-plugin/src/test/groovy/io/realm/gradle/PluginTest.groovy
  21. +5 −1 gradle.properties
  22. BIN gradle/wrapper/gradle-wrapper.jar
  23. +1 −1 gradle/wrapper/gradle-wrapper.properties
  24. +5 −2 library-benchmarks/build.gradle
  25. BIN library-benchmarks/gradle/wrapper/gradle-wrapper.jar
  26. +1 −1 library-benchmarks/gradle/wrapper/gradle-wrapper.properties
  27. BIN library-build-transformer/gradle/wrapper/gradle-wrapper.jar
  28. +1 −1 library-build-transformer/gradle/wrapper/gradle-wrapper.properties
  29. BIN realm-annotations/gradle/wrapper/gradle-wrapper.jar
  30. +1 −1 realm-annotations/gradle/wrapper/gradle-wrapper.properties
  31. +3 −10 realm-transformer/build.gradle
  32. BIN realm-transformer/gradle/wrapper/gradle-wrapper.jar
  33. +1 −1 realm-transformer/gradle/wrapper/gradle-wrapper.properties
  34. +0 −223 realm-transformer/src/test/groovy/io/realm/transformer/BytecodeModifierTest.groovy
  35. +238 −0 realm-transformer/src/test/kotlin/io/realm/transformer/ByteCodeModifierTest.kt
  36. +1 −1 realm.properties
  37. +11 −6 realm/build.gradle
  38. BIN realm/gradle/wrapper/gradle-wrapper.jar
  39. +1 −1 realm/gradle/wrapper/gradle-wrapper.properties
  40. +2 −2 realm/realm-library/build.gradle
View
@@ -67,9 +67,9 @@ In case you don't want to use the precompiled version, you can build Realm yours
### Prerequisites
* Download the [**JDK 8**](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) from Oracle and install it.
* The latest stable version of Android Studio. Currently [3.1.4](https://developer.android.com/studio/).
* Download & install the Android SDK **Build-Tools 27.0.2**, **Android Oreo (API 27)** (for example through Android Studio’s **Android SDK Manager**).
* Install CMake from SDK manager in Android Studio ("SDK Tools" -> "CMake").
* If you use Android Studio, Android Studio 3.0 or higher is required.
* Realm currently requires version r10e of the NDK. Download the one appropriate for your development platform, from the NDK [archive](https://developer.android.com/ndk/downloads/older_releases.html).
You may unzip the file wherever you choose. For macOS, a suggested location is `~/Library/Android`. The download will unzip as the directory `android-ndk-r10e`.
View
@@ -6,3 +6,8 @@ REALM_SYNC_SHA256=f5f52093270c8d26a4b6ba3790c05425d89786033aa6d061fd74e9a24ecb22
# Object Server Release used by Integration tests. Installed using NPM.
# Use `npm view realm-object-server versions` to get a list of available versions.
REALM_OBJECT_SERVER_VERSION=3.9.9
# Common Android settings across projects
GRADLE_BUILD_TOOLS=3.1.4
ANDROID_BUILD_TOOLS=27.0.3
@@ -38,10 +38,10 @@ android {
}
dependencies {
implementation "android.arch.lifecycle:runtime:1.1.0"
implementation "android.arch.lifecycle:extensions:1.1.0"
annotationProcessor "android.arch.lifecycle:compiler:1.1.0"
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:recyclerview-v7:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation "android.arch.lifecycle:runtime:1.1.1"
implementation "android.arch.lifecycle:extensions:1.1.1"
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
}
View
@@ -1,6 +1,8 @@
def projectDependencies = new Properties()
projectDependencies.load(new FileInputStream("${rootDir}/../dependencies.list"))
project.ext.sdkVersion = 27
project.ext.minSdkVersion = 15
project.ext.buildTools = '27.0.2'
project.ext.buildTools = projectDependencies.get("ANDROID_BUILD_TOOLS")
// Don't cache SNAPSHOT (changing) dependencies.
configurations.all {
@@ -33,7 +35,7 @@ allprojects {
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0-alpha06'
classpath "com.android.tools.build:gradle:${projectDependencies.get("GRADLE_BUILD_TOOLS")}"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath "io.realm:realm-gradle-plugin:${currentVersion}"
}
@@ -2,13 +2,13 @@ org.gradle.jvmargs=-Xmx2048M
org.gradle.caching=true
android.enableD8=true
# disable AAPT2 to work around an issue of Robolectric in unitTestExample https://github.com/robolectric/robolectric/issues/3169
android.enableAapt2=false
# Gradle sync failed: Due to a limitation of Gradle’s new variant-aware dependency management, loading the Android Gradle plugin in different class loaders leads to a build error.
# This can occur when the buildscript classpaths that contain the Android Gradle plugin in sub-projects, or included projects in the case of composite builds, are set differently.
# To resolve this issue, add the Android Gradle plugin to only the buildscript classpath of the top-level build.gradle file.
# In the case of composite builds, also make sure the build script classpaths that contain the Android Gradle plugin are identical across the main and included projects.
# If you are using a version of Gradle that has fixed the issue, you can disable this check by setting android.enableBuildScriptClasspathCheck=false in the gradle.properties file.
# To learn more about this issue, go to https://d.android.com/r/tools/buildscript-classpath-check.html.
android.enableBuildScriptClasspathCheck=false
android.enableBuildScriptClasspathCheck=false
# See https://developer.android.com/studio/build/optimize-your-build#configuration_on_demand
org.gradle.configureondemand=false
View
Binary file not shown.
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
@@ -25,6 +25,6 @@ android {
}
dependencies {
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:appcompat-v7:27.1.1'
}
@@ -47,8 +47,8 @@ dependencies {
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation 'com.squareup.retrofit2:converter-jackson:2.3.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.5'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.1.13'
implementation 'me.zhanghai.android.materialprogressbar:library:1.1.4'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' //TODO:Can be refactored with Native Android Data Binding
}
@@ -42,8 +42,8 @@ realm {
}
dependencies {
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'me.zhanghai.android.materialprogressbar:library:1.3.0'
implementation 'com.jakewharton:butterknife:8.8.1'//TODO:Can be refactored with Native Android Data Binding
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'//TODO:Can be refactored with Native Android Data Binding
@@ -35,9 +35,9 @@ android {
}
dependencies {
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.0'
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.1.13'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.0.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation 'com.squareup.retrofit2:converter-jackson:2.3.0'
@@ -33,7 +33,7 @@ dependencies {
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:appcompat-v7:27.1.1'
testImplementation 'junit:junit:4.12'
implementation 'io.realm:secure-userstore:1.0.1'
}
@@ -24,6 +24,5 @@ android {
}
dependencies {
//noinspection GradleDependency
implementation 'com.android.support:appcompat-v7:24.0.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
}
@@ -17,13 +17,13 @@
package io.realm.examples.threads;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
import io.realm.Realm;
import io.realm.examples.threads.model.Person;
public class ReceivingActivity extends ActionBarActivity {
public class ReceivingActivity extends AppCompatActivity {
private Realm realm;
@@ -23,12 +23,12 @@
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import java.util.Locale;
public class ThreadExampleActivity extends ActionBarActivity implements android.support.v7.app.ActionBar.TabListener {
public class ThreadExampleActivity extends AppCompatActivity implements android.support.v7.app.ActionBar.TabListener {
private ViewPager viewPager;
@@ -22,21 +22,27 @@ android {
signingConfig signingConfigs.debug
}
debug {
minifyEnabled true
minifyEnabled false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
}
dependencies {
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:appcompat-v7:27.1.1'
testImplementation 'io.reactivex.rxjava2:rxjava:2.1.5'
testImplementation 'io.reactivex.rxjava2:rxjava:2.1.13'
// Testing
testImplementation 'junit:junit:4.12'
@@ -50,9 +56,9 @@ dependencies {
testImplementation "org.powermock:powermock-classloading-xstream:1.6.5"
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
// Set this dependency to use JUnit 4 rules
androidTestImplementation 'com.android.support.test:rules:1.0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
// Set this dependency to build and run Espresso tests
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
@@ -20,6 +20,9 @@ props.each { key, val ->
project.ext.set(key, val)
}
def projectDependencies = new Properties()
projectDependencies.load(new FileInputStream("${rootDir}/../dependencies.list"))
repositories {
mavenLocal()
google()
@@ -52,11 +55,11 @@ dependencies {
and this https://www.littlerobots.nl/blog/Whats-next-for-android-apt/ for more info.
*/
compile 'com.neenbedankt.gradle.plugins:android-apt:1.8' //TODO: https://www.littlerobots.nl/blog/Whats-next-for-android-apt/
compileOnly 'com.android.tools.build:gradle:3.1.0-alpha06'
compileOnly "com.android.tools.build:gradle:${projectDependencies.get("GRADLE_BUILD_TOOLS")}"
testCompile gradleTestKit()
testCompile 'junit:junit:4.12'
testCompile 'com.android.tools.build:gradle:3.1.0-alpha06'
testCompile "com.android.tools.build:gradle:${projectDependencies.get("GRADLE_BUILD_TOOLS")}"
}
//for Ant filter
View
Binary file not shown.
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
@@ -39,11 +39,14 @@ class PluginTest {
private Project project
private String currentVersion
private Properties projectDependencies
@Before
void setUp() {
project = ProjectBuilder.builder().build()
currentVersion = new File("../version.txt").text.trim()
projectDependencies = new Properties()
projectDependencies.load(new FileInputStream("../dependencies.list"))
}
@Test
@@ -55,7 +58,7 @@ class PluginTest {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0-alpha03'
classpath "com.android.tools.build:gradle:${projectDependencies.get("GRADLE_BUILD_TOOLS")}"
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
}
}
@@ -91,7 +94,7 @@ class PluginTest {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0-alpha03'
classpath "com.android.tools.build:gradle:${projectDependencies.get("GRADLE_BUILD_TOOLS")}"
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
}
}
View
@@ -1,3 +1,7 @@
org.gradle.jvmargs=-XX:MaxPermSize=512m
org.gradle.caching=true
android.enableD8=true
android.enableD8=true
# See https://issuetracker.google.com/issues/80464216
# Can be removed when we upgrade to Android Build Tools 3.3.0
org.gradle.workers.max=1
View
BIN +4 Bytes (100%) gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
@@ -1,11 +1,14 @@
def projectDependencies = new Properties()
projectDependencies.load(new FileInputStream("${rootDir}/../dependencies.list"))
buildscript {
repositories {
mavenLocal()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0-alpha06'
classpath "com.android.tools.build:gradle:${projectDependencies.get("GRADLE_BUILD_TOOLS")}"
classpath "io.realm:realm-gradle-plugin:${file("${rootDir}/../version.txt").text.trim()}"
}
}
@@ -28,7 +31,7 @@ apply plugin: 'realm-android'
android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
buildToolsVersion ${projectDependencies.get("ANDROID_BUILD_TOOLS")}
defaultConfig {
minSdkVersion 15
Binary file not shown.
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
Binary file not shown.
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
View
Binary file not shown.
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.2.40'
ext.kotlin_version = '1.2.50'
repositories {
google()
jcenter()
@@ -20,7 +20,6 @@ allprojects {
}
apply plugin: 'kotlin'
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
@@ -62,14 +61,12 @@ sourceSets {
dependencies {
compile gradleApi()
compile "io.realm:realm-annotations:${version}"
compileOnly "com.android.tools.build:gradle:${properties.get("GRADLE_BUILD_TOOLS")}"
compileOnly 'com.android.tools.build:gradle:3.1.1'
compile 'org.javassist:javassist:3.21.0-GA'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"
testCompile localGroovy()
testCompile('org.spockframework:spock-core:1.0-groovy-2.4') {
exclude module: 'groovy-all'
}
testCompile 'junit:junit:4.12'
}
// for Ant filter
@@ -83,10 +80,6 @@ task generateVersionClass(type: Copy) {
}
compileJava.dependsOn generateVersionClass
compileGroovy.dependsOn = compileGroovy.taskDependencies.values - 'compileJava'
compileKotlin.dependsOn compileGroovy
compileKotlin.classpath += files(compileGroovy.destinationDir)
classes.dependsOn compileKotlin
def commonPom = {
licenses {
View
Binary file not shown.
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
Oops, something went wrong.

0 comments on commit a1cbe18

Please sign in to comment.