Skip to content

Commit 2c0ae23

Browse files
Update build.gradle
1 parent d497ca9 commit 2c0ae23

File tree

14 files changed

+39
-215
lines changed

14 files changed

+39
-215
lines changed

app/build.gradle

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
android {
7-
compileSdkVersion 30
7+
compileSdkVersion buildConfig.compileSdkVersion
88

99
defaultConfig {
1010
applicationId "com.dylanc.viewbinding.sample"
@@ -38,19 +38,18 @@ android {
3838
}
3939

4040
dependencies {
41-
implementation 'androidx.core:core-ktx:1.6.0'
42-
implementation "androidx.fragment:fragment-ktx:1.3.6"
43-
implementation 'androidx.appcompat:appcompat:1.3.1'
44-
implementation 'com.google.android.material:material:1.4.0'
45-
implementation 'com.drakeet.multitype:multitype:4.3.0'
46-
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
47-
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
41+
implementation "androidx.appcompat:appcompat:$appCompatVersion"
42+
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
43+
implementation "com.google.android.material:material:$materialVersion"
44+
implementation "androidx.fragment:fragment-ktx:$fragmentVersion"
45+
implementation "com.drakeet.multitype:multitype:$multiTypeVersion"
46+
implementation "com.github.CymChad:BaseRecyclerViewAdapterHelper:$brvahVersion"
4847
implementation project(path: ':viewbinding-ktx')
4948
implementation project(path: ':viewbinding-nonreflection-ktx')
5049
implementation project(path: ':viewbinding-base')
5150
implementation project(path: ':viewbinding-brvah')
5251

53-
testImplementation 'junit:junit:4.13.2'
54-
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
55-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
52+
testImplementation "junit:junit:$junitVersion"
53+
androidTestImplementation "androidx.test.ext:junit:$junitExtVersion"
54+
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
5655
}

build.gradle

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
buildscript {
2-
ext.kotlinVersion = '1.6.0'
32
ext.buildConfig = [
43
'versionCode' : 1,
54
'versionName' : "1.0.0",
65
'compileSdkVersion': 30,
76
'minSdkVersion' : 14,
87
'targetSdkVersion' : 30
98
]
9+
ext {
10+
appCompatVersion = '1.3.1'
11+
brvahVersion = '3.0.4'
12+
constraintLayoutVersion = '2.1.1'
13+
coreVersion = '1.7.0-alpha01'
14+
espressoVersion = '3.4.0'
15+
fragmentVersion = '1.3.6'
16+
glideVersion = '4.12.0'
17+
kotlinVersion = "1.5.31"
18+
lifecycleVersion = '2.4.0-alpha03'
19+
junitExtVersion = '1.1.3'
20+
junitVersion = '4.13.2'
21+
materialVersion = '1.3.0'
22+
multiTypeVersion = '4.3.0'
23+
}
1024
repositories {
1125
google()
1226
jcenter()

viewbinding-base/build.gradle

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
}
66

77
android {
8-
compileSdkVersion 30
8+
compileSdkVersion buildConfig.compileSdkVersion
99

1010
defaultConfig {
1111
minSdkVersion buildConfig.minSdkVersion
@@ -19,17 +19,14 @@ android {
1919
}
2020
}
2121

22-
compileOptions {
23-
kotlinOptions.freeCompilerArgs += ['-module-name', "viewbinding-base-ktx"]
24-
}
25-
2622
compileOptions {
2723
sourceCompatibility JavaVersion.VERSION_1_8
2824
targetCompatibility JavaVersion.VERSION_1_8
2925
}
3026

3127
kotlinOptions {
3228
jvmTarget = '1.8'
29+
freeCompilerArgs += ['-module-name', "viewbinding-base-ktx"]
3330
}
3431

3532
buildFeatures {
@@ -39,8 +36,5 @@ android {
3936
}
4037

4138
dependencies {
42-
implementation 'com.google.android.material:material:1.3.0'
43-
testImplementation 'junit:junit:4.13.2'
44-
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
45-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
39+
implementation "com.google.android.material:material:$materialVersion"
4640
}

viewbinding-base/src/androidTest/java/com/dylanc/viewbinding/base/ExampleInstrumentedTest.kt

Lines changed: 0 additions & 24 deletions
This file was deleted.

viewbinding-base/src/test/java/com/dylanc/viewbinding/base/ExampleUnitTest.kt

Lines changed: 0 additions & 17 deletions
This file was deleted.

viewbinding-brvah/build.gradle

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
android {
7-
compileSdkVersion 30
7+
compileSdkVersion buildConfig.compileSdkVersion
88

99
defaultConfig {
1010
minSdkVersion buildConfig.minSdkVersion
@@ -17,18 +17,14 @@ android {
1717
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
1818
}
1919
}
20-
21-
compileOptions {
22-
kotlinOptions.freeCompilerArgs += ['-module-name', "viewbinding-brvah-ktx"]
23-
}
24-
2520
compileOptions {
2621
sourceCompatibility JavaVersion.VERSION_1_8
2722
targetCompatibility JavaVersion.VERSION_1_8
2823
}
2924

3025
kotlinOptions {
3126
jvmTarget = '1.8'
27+
freeCompilerArgs += ['-module-name', "viewbinding-brvah-ktx"]
3228
}
3329

3430
buildFeatures {
@@ -38,8 +34,5 @@ android {
3834

3935

4036
dependencies {
41-
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
42-
testImplementation 'junit:junit:4.13.2'
43-
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
44-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
37+
implementation "com.github.CymChad:BaseRecyclerViewAdapterHelper:$brvahVersion"
4538
}

viewbinding-brvah/src/androidTest/java/com/dylanc/viewbinding/brvah/ExampleInstrumentedTest.kt

Lines changed: 0 additions & 24 deletions
This file was deleted.

viewbinding-brvah/src/test/java/com/dylanc/viewbinding/brvah/ExampleUnitTest.kt

Lines changed: 0 additions & 17 deletions
This file was deleted.

viewbinding-ktx/build.gradle

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
}
66

77
android {
8-
compileSdkVersion 30
8+
compileSdkVersion buildConfig.compileSdkVersion
99

1010
defaultConfig {
1111
minSdkVersion buildConfig.minSdkVersion
@@ -19,17 +19,14 @@ android {
1919
}
2020
}
2121

22-
compileOptions {
23-
kotlinOptions.freeCompilerArgs += ['-module-name', "viewbinding-ktx"]
24-
}
25-
2622
compileOptions {
2723
sourceCompatibility JavaVersion.VERSION_1_8
2824
targetCompatibility JavaVersion.VERSION_1_8
2925
}
3026

3127
kotlinOptions {
3228
jvmTarget = '1.8'
29+
freeCompilerArgs += ['-module-name', "viewbinding-ktx"]
3330
}
3431

3532
buildFeatures {
@@ -39,9 +36,6 @@ android {
3936
}
4037

4138
dependencies {
42-
implementation 'com.google.android.material:material:1.3.0'
43-
implementation "androidx.lifecycle:lifecycle-common-java8:2.4.0-alpha03"
44-
testImplementation 'junit:junit:4.13.2'
45-
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
46-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
39+
implementation "com.google.android.material:material:$materialVersion"
40+
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
4741
}

viewbinding-ktx/src/androidTest/java/com/dylanc/viewbinding/ExampleInstrumentedTest.kt

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)