diff options
| author | David Göransson <david.goransson@mullvad.net> | 2024-09-16 11:57:44 +0200 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2024-09-17 10:32:29 +0200 |
| commit | e2f77aed837c3c82333ebf1c36a67ada1f6129f3 (patch) | |
| tree | 2e9898490e6059088337e97d9514279b0b95ca65 /android | |
| parent | 27b618c90981039e1d23f25fc1c1920b71fcac16 (diff) | |
| download | mullvadvpn-e2f77aed837c3c82333ebf1c36a67ada1f6129f3.tar.xz mullvadvpn-e2f77aed837c3c82333ebf1c36a67ada1f6129f3.zip | |
Remove usage of project.buildDir
Diffstat (limited to 'android')
| -rw-r--r-- | android/app/build.gradle.kts | 18 | ||||
| -rw-r--r-- | android/build.gradle.kts | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index f5e4c22d6b..c1874a45cd 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -18,11 +18,11 @@ plugins { } val repoRootPath = rootProject.projectDir.absoluteFile.parentFile.absolutePath -val extraAssetsDirectory = "${project.buildDir}/extraAssets" -val relayListPath = "$extraAssetsDirectory/relays.json" -val maybenotMachinesDirectory = "$extraAssetsDirectory/maybenot_machines" +val extraAssetsDirectory = layout.buildDirectory.dir("extraAssets").get() +val relayListPath = extraAssetsDirectory.file("relays.json").asFile +val maybenotMachinesFile = extraAssetsDirectory.file("maybenot_machines").asFile val defaultChangelogAssetsDirectory = "$repoRootPath/android/src/main/play/release-notes/" -val extraJniDirectory = "${project.buildDir}/extraJni" +val extraJniDirectory = layout.buildDirectory.dir("extraJni").get() val credentialsPath = "${rootProject.projectDir}/credentials" val keystorePropertiesFile = file("$credentialsPath/keystore.properties") @@ -229,7 +229,7 @@ android { val createDistBundle = tasks.register<Copy>("create${capitalizedVariantName}DistBundle") { - from("$buildDir/outputs/bundle/$variantName") + from("${layout.buildDirectory}/outputs/bundle/$variantName") into("${rootDir.parent}/dist") include { it.name.endsWith(".aab") } rename { "$artifactName.aab" } @@ -279,7 +279,7 @@ configure<org.owasp.dependencycheck.gradle.extension.DependencyCheckExtension> { tasks.register("ensureRelayListExist") { doLast { - if (!file(relayListPath).exists()) { + if (!relayListPath.exists()) { throw GradleException("Missing relay list: $relayListPath") } } @@ -287,15 +287,15 @@ tasks.register("ensureRelayListExist") { tasks.register("ensureMaybenotMachinesExist") { doLast { - if (!file(maybenotMachinesDirectory).exists()) { - throw GradleException("Missing maybenot machines: $maybenotMachinesDirectory") + if (!maybenotMachinesFile.exists()) { + throw GradleException("Missing maybenot machines: $maybenotMachinesFile") } } } tasks.register("ensureJniDirectoryExist") { doLast { - if (!file(extraJniDirectory).exists()) { + if (!extraJniDirectory.asFile.exists()) { throw GradleException("Missing JNI directory: $extraJniDirectory") } } diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 5964065f2f..e0045decc6 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -127,4 +127,4 @@ tasks.withType<DependencyUpdatesTask> { rejectVersionIf { candidate.version.isNonStableVersion() } } -tasks.register("clean", Delete::class) { delete(rootProject.buildDir) } +tasks.register("clean", Delete::class) { delete(rootProject.layout.buildDirectory) } |
