Browse Source

automatic java8

Daniel Zlotin 6 years ago
parent
commit
070fa60480

+ 18
- 16
lib/android/app/build.gradle View File

5
     compileSdkVersion 25
5
     compileSdkVersion 25
6
     buildToolsVersion "27.0.1"
6
     buildToolsVersion "27.0.1"
7
 
7
 
8
-    compileOptions {
9
-        sourceCompatibility JavaVersion.VERSION_1_8
10
-        targetCompatibility JavaVersion.VERSION_1_8
11
-    }
12
-
13
     defaultConfig {
8
     defaultConfig {
14
-        minSdkVersion 16
9
+        minSdkVersion 19
15
         targetSdkVersion 25
10
         targetSdkVersion 25
16
         versionCode 1
11
         versionCode 1
17
         versionName "1.0"
12
         versionName "1.0"
49
     }
44
     }
50
 }
45
 }
51
 
46
 
47
+allprojects { p ->
48
+    p.afterEvaluate {
49
+        p.android.compileOptions.sourceCompatibility JavaVersion.VERSION_1_8
50
+        p.android.compileOptions.targetCompatibility JavaVersion.VERSION_1_8
51
+    }
52
+}
53
+
52
 dependencies {
54
 dependencies {
53
-    compile fileTree(include: ['*.jar'], dir: 'libs')
54
-    compile 'com.android.support:design:25.3.1'
55
-    compile 'com.android.support:appcompat-v7:25.3.1'
56
-    compile "com.android.support:support-v4:25.3.1"
55
+    implementation fileTree(include: ['*.jar'], dir: 'libs')
56
+    implementation 'com.android.support:design:25.4.0'
57
+    implementation 'com.android.support:appcompat-v7:25.4.0'
58
+    implementation "com.android.support:support-v4:25.4.0"
57
 
59
 
58
     // node_modules
60
     // node_modules
59
     //noinspection GradleDynamicVersion
61
     //noinspection GradleDynamicVersion
60
-    compile 'com.facebook.react:react-native:+'
62
+    implementation 'com.facebook.react:react-native:+'
61
 
63
 
62
     // tests
64
     // tests
63
-    testCompile 'junit:junit:4.12'
64
-    testCompile 'org.robolectric:robolectric:3.5.1'
65
-    testCompile 'org.assertj:assertj-core:2.5.0'
66
-    testCompile 'com.squareup.assertj:assertj-android:1.1.1'
67
-    testCompile 'org.mockito:mockito-core:2.7.5'
65
+    testImplementation 'junit:junit:4.12'
66
+    testImplementation 'org.robolectric:robolectric:3.5.1'
67
+    testImplementation 'org.assertj:assertj-core:2.8.0'
68
+    testImplementation 'com.squareup.assertj:assertj-android:1.1.1'
69
+    testImplementation 'org.mockito:mockito-core:2.12.0'
68
 }
70
 }

+ 1
- 1
lib/android/prepare-robolectric.gradle View File

3
 configurations.create('robolectricRuntime')
3
 configurations.create('robolectricRuntime')
4
 
4
 
5
 dependencies {
5
 dependencies {
6
-    testCompile "org.khronos:opengl-api:gl1.1-android-2.1_r1"
6
+    testImplementation "org.khronos:opengl-api:gl1.1-android-2.1_r1"
7
 
7
 
8
     robolectricRuntime "org.robolectric:android-all:8.1.0-robolectric-4402310"
8
     robolectricRuntime "org.robolectric:android-all:8.1.0-robolectric-4402310"
9
 
9
 

+ 6
- 11
playground/android/app/build.gradle View File

11
     compileSdkVersion 25
11
     compileSdkVersion 25
12
     buildToolsVersion "27.0.1"
12
     buildToolsVersion "27.0.1"
13
 
13
 
14
-    compileOptions {
15
-        sourceCompatibility JavaVersion.VERSION_1_8
16
-        targetCompatibility JavaVersion.VERSION_1_8
17
-    }
18
-
19
     defaultConfig {
14
     defaultConfig {
20
         applicationId "com.reactnativenavigation.playground"
15
         applicationId "com.reactnativenavigation.playground"
21
-        minSdkVersion 16
16
+        minSdkVersion 19
22
         targetSdkVersion 25
17
         targetSdkVersion 25
23
         versionCode 1
18
         versionCode 1
24
         versionName "1.0"
19
         versionName "1.0"
42
 }
37
 }
43
 
38
 
44
 dependencies {
39
 dependencies {
45
-    compile fileTree(dir: 'libs', include: ['*.jar'])
46
-    compile 'com.facebook.react:react-native:+'
47
-    compile 'com.android.support:design:25.3.1'
48
-    compile "com.android.support:appcompat-v7:25.3.1"
49
-    compile project(':react-native-navigation')
40
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
41
+    implementation 'com.facebook.react:react-native:+'
42
+    implementation 'com.android.support:design:25.4.0'
43
+    implementation "com.android.support:appcompat-v7:25.4.0"
44
+    implementation project(':react-native-navigation')
50
 }
45
 }