Skip to content

Commit

Permalink
Use SdkConstants for getting aapt2 executable location
Browse files Browse the repository at this point in the history
Change-Id: Ibc9ece0c3ade51a29954caee3af3a669ed99c384
  • Loading branch information
alexvanyo committed Nov 2, 2023
1 parent 3ccacba commit c730cf2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ tasks.withType<KotlinCompile>().configureEach {

dependencies {
compileOnly(libs.android.gradlePlugin)
compileOnly(libs.android.tools.common)
compileOnly(libs.firebase.crashlytics.gradlePlugin)
compileOnly(libs.firebase.performance.gradlePlugin)
compileOnly(libs.kotlin.gradlePlugin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package com.google.samples.apps.nowinandroid
import com.android.build.api.artifact.SingleArtifact
import com.android.build.api.variant.ApplicationAndroidComponentsExtension
import com.android.build.gradle.BaseExtension
import com.android.SdkConstants
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.Project
Expand Down Expand Up @@ -113,7 +114,9 @@ fun Project.configureBadgingTasks(
aapt2Executable.set(
File(
baseExtension.sdkDirectory,
"build-tools/${baseExtension.buildToolsVersion}/aapt2",
"${SdkConstants.FD_BUILD_TOOLS}/" +
"${baseExtension.buildToolsVersion}/" +
SdkConstants.FN_AAPT2,
),
)

Expand Down
3 changes: 3 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[versions]
accompanist = "0.32.0"
androidDesugarJdkLibs = "2.0.3"
# AGP and tools should be updated together
androidGradlePlugin = "8.1.2"
androidTools = "31.1.2"
androidxActivity = "1.8.0"
androidxAppCompat = "1.6.1"
androidxBrowser = "1.6.0"
Expand Down Expand Up @@ -139,6 +141,7 @@ turbine = { group = "app.cash.turbine", name = "turbine", version.ref = "turbine

# Dependencies of the included build-logic
android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }
android-tools-common = { group = "com.android.tools", name = "common", version.ref = "androidTools" }
firebase-crashlytics-gradlePlugin = { group = "com.google.firebase", name = "firebase-crashlytics-gradle", version.ref = "firebaseCrashlyticsPlugin" }
firebase-performance-gradlePlugin = { group = "com.google.firebase", name = "perf-plugin", version.ref = "firebasePerfPlugin" }
kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
Expand Down

0 comments on commit c730cf2

Please sign in to comment.