This step, the thrid party library in fact is just a module in the project: implementation(project())
- run
./gradlew clean
- run
rm -rf app/libs
- build:
./gradlew :app:assembleDebug
Should compile with success
This step, we build the library, generating a Aar and then import the Aar in the app module.
- run
./gradlew clean
- run
./gradlew :mylibrary:assembleRelease
- run
./gradlew :app:assembleDebug
Should fail with:
e: app/src/main/java/com/example/androidviewbinding/MainActivity.kt: (16, 30): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
internal val File.root: File defined in kotlin.io