Skip to content

Commit ee31dd4

Browse files
committed
fix: android fix when passing compileSdk as gradle arg
1 parent 2ffdce9 commit ee31dd4

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/services/android/gradle-build-args-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class GradleBuildArgsService implements IGradleBuildArgsService {
5757

5858
args.push(
5959
`--stacktrace`,
60-
`-PcompileSdk=android-${toolsInfo.compileSdkVersion}`,
60+
`-PcompileSdk=${toolsInfo.compileSdkVersion}`,
6161
`-PtargetSdk=${toolsInfo.targetSdkVersion}`,
6262
`-PbuildToolsVersion=${toolsInfo.buildToolsVersion}`,
6363
`-PgenerateTypings=${toolsInfo.generateTypings}`,

test/services/android/gradle-build-args-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const expectedInfoLoggingArgs = ["--quiet"];
6363
const expectedTraceLoggingArgs = ["--debug"];
6464
const expectedDebugBuildArgs = [
6565
"--stacktrace",
66-
"-PcompileSdk=android-28",
66+
"-PcompileSdk=28",
6767
"-PtargetSdk=26",
6868
"-PbuildToolsVersion=my-build-tools-version",
6969
"-PgenerateTypings=true",

vendor/gradle-app/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def pluginsJarLibraries = new LinkedList<String>()
8686
def allJarLibraries = new LinkedList<String>()
8787

8888
def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "${ns_default_kotlin_version}" }
89-
def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : NS_DEFAULT_COMPILE_SDK_VERSION as int }
90-
def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk : NS_DEFAULT_COMPILE_SDK_VERSION as int }
89+
def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk as int : NS_DEFAULT_COMPILE_SDK_VERSION as int }
90+
def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk as int : NS_DEFAULT_COMPILE_SDK_VERSION as int }
9191
def computeBuildToolsVersion = { ->
9292
project.hasProperty("buildToolsVersion") ? buildToolsVersion : NS_DEFAULT_BUILD_TOOLS_VERSION as String
9393
}

0 commit comments

Comments
 (0)