https://github.com/autonomousapps/androiddebugloggingissue
Example project when `--debug` causes Android project configuration to fail
https://github.com/autonomousapps/androiddebugloggingissue
Last synced: 5 months ago
JSON representation
Example project when `--debug` causes Android project configuration to fail
- Host: GitHub
- URL: https://github.com/autonomousapps/androiddebugloggingissue
- Owner: autonomousapps
- Created: 2019-02-07T20:22:55.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-07T20:32:48.000Z (almost 7 years ago)
- Last Synced: 2025-05-19T22:42:00.763Z (8 months ago)
- Language: Groovy
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AndroidDebugLoggingIssue
Example project when `--debug` causes Android project configuration to fail
This succeeds:
```
./gradlew :app:assembleDebug
```
This fails:
```
./gradlew clean && ./gradlew :app:assembleDebug --debug
```
(nb: `./gradlew clean :app:assembleDebug --debug` does not always fail)
The failure looks like this:
```
12:24:40.914 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
12:24:40.914 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:24:40.914 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
12:24:40.914 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] A problem occurred configuring project ':library'.
12:24:40.914 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not resolve all files for configuration ':library:debugUnitTestCompileClasspath'.
12:24:40.914 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Failed to transform file 'javalibrary.jar' to match attributes {artifactType=processed-jar} using transform IdentityTransform
12:24:40.914 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Transform output file /home/tony/workspace/temp/DebugLogging/javalibrary/build/libs/javalibrary.jar does not exist.
```
This doesn't make any sense, since there's no reason to try to resolve `:library:debugUnitTestCompileClasspath` when I'm only requesting `debug`.
Reproducing this problem seemed to require the following steps:
1. An Android library project.
1. This Android library project should have the [Android Groovy plugin](https://github.com/groovy/groovy-android-gradle-plugin) applied (use-case: Spock tests)
1. There must be at least one Groovy class in `android-lib/src/test/groovy` to trigger the issue.
1. This Android library project must have one project dependency on a plain `java-library` proejct.