Stylianos Gakis
10/31/2024, 2:53 PMStylianos Gakis
10/31/2024, 2:53 PMSome problems were found with the configuration of task ':apollo-octopus-public:explodeCodeSourceDebug' (type 'CodeSourceExploderTask').
- Gradle detected a problem with the following location: '/Users/stylianosgakis/WorkProjects/hedvigandroid/app/apollo/apollo-octopus-public/build/generated/source/apollo/octopus/octopus/FlowClaimLocationNextMutation.kt'.
Reason: Task ':apollo-octopus-public:explodeCodeSourceDebug' uses this output of task ':apollo-octopus-public:generateOctopusApolloSources' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':apollo-octopus-public:generateOctopusApolloSources' as an input of ':apollo-octopus-public:explodeCodeSourceDebug'.
2. Declare an explicit dependency on ':apollo-octopus-public:generateOctopusApolloSources' from ':apollo-octopus-public:explodeCodeSourceDebug' using Task#dependsOn.
3. Declare an explicit dependency on ':apollo-octopus-public:generateOctopusApolloSources' from ':apollo-octopus-public:explodeCodeSourceDebug' using Task#mustRunAfter.
For more information, please refer to <https://docs.gradle.org/8.10.2/userguide/validation_problems.html#implicit_dependency> in the Gradle documentation.
bod
10/31/2024, 2:56 PMmbonnin
10/31/2024, 2:58 PMexplodeCodeSourceDebug
task? Something AGP?mbonnin
10/31/2024, 2:59 PMmbonnin
10/31/2024, 3:05 PMStylianos Gakis
10/31/2024, 3:17 PMmbonnin
10/31/2024, 3:22 PMmbonnin
10/31/2024, 3:34 PMStylianos Gakis
10/31/2024, 3:46 PMStylianos Gakis
10/31/2024, 4:17 PMdagp-repro
branch where I've deleted the stuff you don't have (also makes the app not functionally work as you get stuck on the splash screen waiting for the auth to resolve, but that's not important)
*Here I also had to go to Settings | Build, Execution, Deployment | Build Tools | Gradle
and change Gradle JDK to my "JAVA_HOME" otherwise gradle doctror was complaining
Sync project
Finally run ./gradlew buildHealth
And see the error show up, along with a lot of other things around android resource linking failures, which are also just showing up when I started running this build health project, I think you can safely ignorembonnin
10/31/2024, 4:18 PMmbonnin
10/31/2024, 4:46 PM> Android resource linking failed
ERROR: /Users/martinbonnin/git/hedvig-android/app/core/core-resources/build/intermediates/packaged_res/debug/packageDebugResources/drawable/ic_back.xml:2: AAPT: error: resource attr/colorPrimary (aka com.hedvig.android.data.chat.test:attr/colorPrimary) not found.
Trying to workaroundStylianos Gakis
10/31/2024, 4:57 PMStylianos Gakis
10/31/2024, 4:57 PMmbonnin
10/31/2024, 5:09 PM./gradlew :buildHealth
works β
mbonnin
10/31/2024, 5:26 PMmbonnin
10/31/2024, 5:26 PMconnectToKotlinSourceSet("main")
?Stylianos Gakis
10/31/2024, 6:20 PMconnectToAllAndroidVariants()
before πmbonnin
10/31/2024, 6:30 PMoutputDirConnection {}
outmbonnin
10/31/2024, 6:30 PMconnectToAllAndroidVariants()
goes through all android variants and calls registerJavaGeneratingTask()
(yea, I know π
)mbonnin
10/31/2024, 6:31 PMconnectToKotlinSourceSet("main")
goes through kotlin.sourceSet("main")
directly, which is then included by all variantsmbonnin
10/31/2024, 6:32 PMconnectToKotlinSourceSet("main")
doesn't need to know about AGP and is much simpler but also in some cases like this it behaves a bit differentlyStylianos Gakis
10/31/2024, 6:36 PMmbonnin
10/31/2024, 6:37 PMmbonnin
10/31/2024, 6:39 PMStylianos Gakis
10/31/2024, 6:48 PMmbonnin
10/31/2024, 7:11 PMmbonnin
10/31/2024, 7:13 PMStylianos Gakis
11/04/2024, 1:16 PMmbonnin
11/04/2024, 1:31 PM