Skip to content

Commit 8b0a5ff

Browse files
committed
chore: changes to go with merge
1 parent 4f84b58 commit 8b0a5ff

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

lib/services/android-plugin-build-service.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,11 @@ export class AndroidPluginBuildService implements IAndroidPluginBuildService {
399399
gradleVersion
400400
);
401401

402+
this.replaceGradleAndroidPluginVersion(
403+
buildGradlePath,
404+
runtimeGradleVersions.gradleAndroidPluginVersion
405+
);
406+
402407
// In gradle 8 every android project must have a namespace in "android"
403408
// and the package property in manifest is now forbidden
404409
// let s replace it
@@ -631,6 +636,22 @@ export class AndroidPluginBuildService implements IAndroidPluginBuildService {
631636
);
632637
}
633638

639+
private replaceGradleAndroidPluginVersion(
640+
buildGradlePath: string,
641+
version: string
642+
): void {
643+
const gradleAndroidPluginVersionPlaceholder =
644+
"{{runtimeAndroidPluginVersion}}";
645+
const gradleAndroidPluginVersion =
646+
version || AndroidBuildDefaults.GradleAndroidPluginVersion;
647+
648+
this.replaceFileContent(
649+
buildGradlePath,
650+
gradleAndroidPluginVersionPlaceholder,
651+
gradleAndroidPluginVersion
652+
);
653+
}
654+
634655
private replaceFileContent(
635656
filePath: string,
636657
content: string,

vendor/gradle-plugin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ buildscript {
209209
applyBuildScriptConfigurations()
210210

211211
def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "${ns_default_kotlin_version}" }
212-
def computeBuildToolsVersion = { -> project.hasProperty("androidBuildToolsVersion") ? androidBuildToolsVersion : "${NS_DEFAULT_ANDROID_BUILD_TOOLS_VERSION}" }
212+
def computeBuildToolsVersion = { -> project.hasProperty("androidBuildToolsVersion") ? androidBuildToolsVersion : "{{runtimeAndroidPluginVersion}}" }
213213
def kotlinVersion = computeKotlinVersion()
214214
def androidBuildToolsVersion = computeBuildToolsVersion()
215215

0 commit comments

Comments
 (0)