1
- def DEFAULT_COMPILE_SDK_VERSION = 35
2
- def DEFAULT_MIN_SDK_VERSION = 26
3
- def DEFAULT_TARGET_SDK_VERSION = 35
4
- def DEFAULT_KOTLIN_VERSION = " 2.0.21"
5
- def DEFAULT_AGP_VERSION = " 8.7.3"
6
-
7
1
buildscript {
8
- ext. safeExtGet = {prop , fallback ->
9
- rootProject. ext. has(prop) ? rootProject. ext. get(prop) : fallback
2
+ ext. safeExtGet = {prop ->
3
+ rootProject. ext. has(prop) ? rootProject. ext. get(prop) : project . properties[ ' argyle_plugin_rn_ ' + prop]
10
4
}
11
5
repositories {
12
6
google()
@@ -16,8 +10,8 @@ buildscript {
16
10
dependencies {
17
11
// Matches recent template from React Native (0.60)
18
12
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
19
- classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:${ safeExtGet('kotlinVersion', DEFAULT_KOTLIN_VERSION )} "
20
- classpath " com.android.tools.build:gradle:${ safeExtGet('agpVersion', DEFAULT_AGP_VERSION )} "
13
+ classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:${ safeExtGet('kotlinVersion')} "
14
+ classpath " com.android.tools.build:gradle:${ safeExtGet('gradlePluginVersion' )} "
21
15
}
22
16
}
23
17
@@ -26,11 +20,11 @@ apply plugin: 'com.android.library'
26
20
apply plugin : ' kotlin-android'
27
21
28
22
android {
29
- compileSdkVersion safeExtGet(' compileSdkVersion' , DEFAULT_COMPILE_SDK_VERSION )
23
+ compileSdkVersion safeExtGet(' compileSdkVersion' )
30
24
31
25
defaultConfig {
32
- minSdkVersion safeExtGet(' minSdkVersion' , DEFAULT_MIN_SDK_VERSION )
33
- targetSdkVersion safeExtGet(' targetSdkVersion' , DEFAULT_TARGET_SDK_VERSION )
26
+ minSdkVersion safeExtGet(' minSdkVersion' )
27
+ targetSdkVersion safeExtGet(' targetSdkVersion' )
34
28
versionCode 1
35
29
versionName " 1.0"
36
30
}
@@ -51,8 +45,8 @@ repositories {
51
45
}
52
46
53
47
dependencies {
54
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:${ project.ext. kotlinVersion} "
55
- implementation " com.facebook.react:react-native:${ safeExtGet('reactnativeVersion', '+' )} "
48
+ implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:${ safeExtGet(' kotlinVersion') } "
49
+ implementation " com.facebook.react:react-native:${ safeExtGet('reactnativeVersion')} "
56
50
implementation ' com.argyle:argyle-link-android:5.13.0'
57
51
}
58
52
0 commit comments