binary-compatibility-validator
binary-compatibility-validator copied to clipboard
`apiDump` task is always in `SKIPPED` state when plugin applied on Android project.
This check is always false https://github.com/Kotlin/binary-compatibility-validator/blob/master/src/main/kotlin/BinaryCompatibilityValidatorPlugin.kt#L87 for Android project.
This is because source files are located in src/main/java
or src/main/kotlin
by convention, but sourceSets
list points only to src/release/kotlin
and src/release/java
.
There's no KotlinJvmAndroidCompilation
with name main
.
If I remove compilation.allKotlinSourceSets.any { it.kotlin.srcDirs.any { it.exists() } }
check, API dump is generated.
Could you please provide a simple reproducing project?
The fix is slightly more complicated than that because this check is necessary to filter out root projects without sources
@qwwdfsad any progress with this issue?
I'm working on an Android library project and tried to use this plugin version '0.8.0'. In our project we have a lot of modules and we keep our sources in java
folder instead of src/main/java
or src/main/kotlin
.
android {
sourceSets {
main.java.srcDir 'java'
}
}
With such configuration apiDump
doesn't dump public API.
But it works if an empty src/main/java
directory is present in the project(in each module). So with empty project/src/main/java
'apiDump' task dumps public API for the code located in project/java
No progress. I'm ready to accept a contribution (as long as it's accompanied with a corresponding test) or a reproducing project to help me reproduce and fix the issue