Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

minjun011026
Copy link

@minjun011026 minjun011026 commented Aug 13, 2025

What I have done and why

  • Previously, the aapt2 file path was manually constructed by concatenating the SDK directory path with the buildToolsVersion.
  • This was a temporary workaround, marked with a TODO to migrate once an official API became available.
aapt2Executable.set(
    // TODO: Replace with `sdkComponents.aapt2` when it's available in AGP
    //       https://issuetracker.google.com/issues/376815836
    componentsExtension.sdkComponents.sdkDirectory.map { directory ->
        directory.file(
            "${SdkConstants.FD_BUILD_TOOLS}/" +
                "${baseExtension.buildToolsVersion}/" +
                SdkConstants.FN_AAPT2,
        )
    }
)
  • This change replaces the manual path construction with the official Android Gradle Plugin (AGP) API: componentsExtension.sdkComponents.aapt2.
aapt2Executable.set(
    componentsExtension.sdkComponents.aapt2.flatMap { aapt2 ->
        aapt2.executable
    }
)

https://issuetracker.google.com/issues/376815836?pli=1

@minjun011026 minjun011026 requested a review from dturner as a code owner August 13, 2025 03:57
@minjun011026
Copy link
Author

I want to apologize for triggering too many GitHub Actions workflows recently. I’m new to using GitHub Actions and didn’t realize the impact it could have.
My eagerness to resolve the issue got ahead of me, and I’m sorry for any inconvenience this may have caused.

@Jaehwa-Noh
Copy link
Contributor

@minjun011026 Don't warry about that. Github action is pending until maintainer running action on your PR.

@minjun011026
Copy link
Author

minjun011026 commented Aug 18, 2025

@Jaehwa-Noh Ah, I see! Thank you for letting me know. I’ll be more mindful next time 🙏

@minjun011026 minjun011026 force-pushed the use-aapt2-component-api branch 2 times, most recently from 9e12482 to 80074de Compare August 19, 2025 05:35
@minjun011026 minjun011026 force-pushed the use-aapt2-component-api branch from 80074de to f80609f Compare August 19, 2025 05:41
@@ -2,8 +2,8 @@
accompanist = "0.37.0"
androidDesugarJdkLibs = "2.1.4"
# AGP and tools should be updated together
androidGradlePlugin = "8.9.0"
androidTools = "31.9.0"
androidGradlePlugin = "8.10.1"

Check warning

Code scanning / Android Lint

Obsolete Android Gradle Plugin Version Warning

A newer version of com.android.library than 8.10.1 is available: 8.12.1
@@ -2,8 +2,8 @@
accompanist = "0.37.0"
androidDesugarJdkLibs = "2.1.4"
# AGP and tools should be updated together
androidGradlePlugin = "8.9.0"
androidTools = "31.9.0"
androidGradlePlugin = "8.10.1"

Check warning

Code scanning / Android Lint

Obsolete Android Gradle Plugin Version Warning

A newer version of com.android.test than 8.10.1 is available: 8.12.1
@@ -2,8 +2,8 @@
accompanist = "0.37.0"
androidDesugarJdkLibs = "2.1.4"
# AGP and tools should be updated together
androidGradlePlugin = "8.9.0"
androidTools = "31.9.0"
androidGradlePlugin = "8.10.1"

Check warning

Code scanning / Android Lint

Obsolete Android Gradle Plugin Version Warning

A newer version of com.android.tools.build:gradle than 8.10.1 is available: 8.12.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants