Skip to content

Commit a0ad436

Browse files
committed
Build: Extract common sdk versions to root build gradle for all modules
This will now make sure that from now on all modules will be pointing to the same 'min/compile/targetSdkVersion' versions, making such upgrades much more straightforward as that will apply to all modules. This will alleviate the risk of forgetting to update a specific module, or set of modules due to an oversight.
1 parent a27076d commit a0ad436

File tree

8 files changed

+27
-23
lines changed

8 files changed

+27
-23
lines changed

app/build.gradle

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

66
android {
7-
compileSdkVersion 28
7+
compileSdkVersion rootProject.compileSdkVersion
88

99
defaultConfig {
1010
applicationId "org.wordpress.aztec"
11-
minSdkVersion commonMinSdkVersion
12-
targetSdkVersion commonTargetSdkVersion
11+
minSdkVersion rootProject.minSdkVersion
12+
targetSdkVersion rootProject.targetSdkVersion
1313
versionCode 1
1414
versionName "1.0"
1515
vectorDrawables.useSupportLibrary = true

aztec/build.gradle

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

77
android {
8-
compileSdkVersion 28
8+
compileSdkVersion rootProject.compileSdkVersion
99

1010
defaultConfig {
11-
minSdkVersion commonMinSdkVersion
12-
targetSdkVersion commonTargetSdkVersion
11+
minSdkVersion rootProject.minSdkVersion
12+
targetSdkVersion rootProject.targetSdkVersion
1313
versionName "1.0"
1414
vectorDrawables.useSupportLibrary = true
1515
}

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ subprojects {
6262
}
6363
}
6464

65+
ext {
66+
minSdkVersion = 21
67+
compileSdkVersion = 28
68+
targetSdkVersion = 31
69+
}
70+
6571
ext {
6672
gradlePluginVersion = '3.3.1'
6773
kotlinCoroutinesVersion = '1.1.0'
@@ -73,8 +79,6 @@ ext {
7379
jSoupVersion = '1.11.3'
7480
wordpressUtilsVersion = 'trunk-1ed207c03d2242b6fc3d74f9e388e9163cbc82a6'
7581
espressoVersion = '3.0.1'
76-
commonTargetSdkVersion = 31
77-
commonMinSdkVersion = 21
7882

7983
aztecProjectDependency = project.hasProperty("aztecVersion") ? "org.wordpress:aztec:${project.getProperty("aztecVersion")}" : project(":aztec")
8084
}

glide-loader/build.gradle

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

77
android {
8-
compileSdkVersion 28
8+
compileSdkVersion rootProject.compileSdkVersion
99

1010
defaultConfig {
11-
minSdkVersion commonMinSdkVersion
12-
targetSdkVersion commonTargetSdkVersion
11+
minSdkVersion rootProject.minSdkVersion
12+
targetSdkVersion rootProject.targetSdkVersion
1313
versionCode 1
1414
versionName "1.0"
1515

media-placeholders/build.gradle

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

77
android {
8-
compileSdk 28
8+
compileSdkVersion rootProject.compileSdkVersion
99

1010
defaultConfig {
11-
minSdkVersion commonMinSdkVersion
12-
targetSdkVersion commonTargetSdkVersion
11+
minSdkVersion rootProject.minSdkVersion
12+
targetSdkVersion rootProject.targetSdkVersion
1313
versionName "1.0"
1414
}
1515

picasso-loader/build.gradle

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

77
android {
8-
compileSdkVersion 28
8+
compileSdkVersion rootProject.compileSdkVersion
99

1010
defaultConfig {
11-
minSdkVersion commonMinSdkVersion
12-
targetSdkVersion commonTargetSdkVersion
11+
minSdkVersion rootProject.minSdkVersion
12+
targetSdkVersion rootProject.targetSdkVersion
1313
versionCode 1
1414
versionName "1.0"
1515
}

wordpress-comments/build.gradle

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

77
android {
8-
compileSdkVersion 28
8+
compileSdkVersion rootProject.compileSdkVersion
99

1010
defaultConfig {
11-
minSdkVersion commonMinSdkVersion
12-
targetSdkVersion commonTargetSdkVersion
11+
minSdkVersion rootProject.minSdkVersion
12+
targetSdkVersion rootProject.targetSdkVersion
1313
versionName "1.0"
1414
vectorDrawables.useSupportLibrary = true
1515
}

wordpress-shortcodes/build.gradle

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

77
android {
8-
compileSdkVersion 28
8+
compileSdkVersion rootProject.compileSdkVersion
99

1010
defaultConfig {
11-
minSdkVersion commonMinSdkVersion
12-
targetSdkVersion commonTargetSdkVersion
11+
minSdkVersion rootProject.minSdkVersion
12+
targetSdkVersion rootProject.targetSdkVersion
1313
versionName "1.0"
1414
}
1515

0 commit comments

Comments
 (0)