Skip to content

Commit d79e0c1

Browse files
fix: set correct versions in plugin's build.gradle
With Gradle 3.3.0 (used in tns-android 5.2.0-... ) dependencies checking is stricter and there are some problems in the resolution of the supportLibrary version when building plugins. Issue is raised when the plugin has any of the following: * another compile dependency which is built with `compile` of android support library version that is not the same as the one we are using * plugin defines in its gradle new version of android support library, that is different from the one specified in our build.gradle. To resolve this, set all versions of `com.android.support` libraries to the passed supportVersion or 28.0.0 Also update other tooling versions to latest versions.
1 parent c882b92 commit d79e0c1

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

vendor/gradle-plugin/build.gradle

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ allprojects {
2727

2828
apply plugin: 'com.android.library'
2929

30-
def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : 24 }
30+
def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : 28 }
3131
def computeBuildToolsVersion = { ->
32-
project.hasProperty("buildToolsVersion") ? buildToolsVersion : "27.0.3"
32+
project.hasProperty("buildToolsVersion") ? buildToolsVersion : "28.0.3"
3333
}
3434

3535
android {
@@ -46,12 +46,20 @@ android {
4646
}
4747

4848
dependencies {
49-
def supportVer = "27.0.1"
49+
def supportVer = "28.0.0"
5050
if (project.hasProperty("supportVersion")) {
5151
supportVer = supportVersion
5252
}
5353
compileOnly "com.android.support:support-v4:$supportVer"
5454
compileOnly "com.android.support:appcompat-v7:$supportVer"
55+
56+
configurations.all {
57+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
58+
if (details.requested.group == "com.android.support" && !details.requested.name.startsWith("multidex")) {
59+
details.useVersion supportVer
60+
}
61+
}
62+
}
5563
}
5664

5765
def getAppResourcesPath() {

0 commit comments

Comments
 (0)