Support Android projects
Closed this issue ยท 10 comments
Currently, the plugin will ignore any subprojects that are built with the Android Gradle Plugin.
I've pushed the potential fix to master. Unfortunately, I was not able to build workspace
project, so I've tested it with a simpler Android configuration.
Could you please verify that fix works as expected? It should be enough to checkout this project, run ./gradlew publishToMavenLocal
and then add mavenLocal
repository to your project and change BVC version to 0.1.2-SNAPSHOT
. If everything is ok, I'll release it as is.
I'll setup proper integration tests for different kinds of projects as soon as I find more spare time
I tested 0.1.2-SNAPSHOT
locally with an Android project. Running ./gradlew apiDump
now produces the following error:
Could not determine the dependencies of task ':flowbinding-activity:apiBuild'.
> Could not resolve all task dependencies for configuration ':flowbinding-activity:releaseCompileClasspath'.
> More than one variant of project :flowbinding-common matches the consumer attributes:
- Configuration ':flowbinding-common:releaseApiElements' variant android-aidl:
- Unmatched attributes:
- Found artifactType 'android-aidl' but wasn't required.
- Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
- Compatible attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'release' and found compatible value 'release'.
- Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'androidJvm'.
- Configuration ':flowbinding-common:releaseApiElements' variant android-manifest:
- Unmatched attributes:
- Found artifactType 'android-manifest' but wasn't required.
- Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
- Compatible attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'release' and found compatible value 'release'.
- Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'androidJvm'.
- Configuration ':flowbinding-common:releaseApiElements' variant android-renderscript:
- Unmatched attributes:
- Found artifactType 'android-renderscript' but wasn't required.
- Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
- Compatible attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'release' and found compatible value 'release'.
- Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'androidJvm'.
- Configuration ':flowbinding-common:releaseApiElements' variant android-symbol-with-package-name:
- Unmatched attributes:
- Found artifactType 'android-symbol-with-package-name' but wasn't required.
- Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
- Compatible attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'release' and found compatible value 'release'.
- Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'androidJvm'.
Thanks for the reproducer, @ychescale9!
This a known gradle/gradle#5426 issue, trying to find a compelling workaround
@ychescale9 could you please give it another try? The issue looks to be fixed, apiDump
works with FlowBindings
for me, including incremental compilation and dependency tracking.
@qwwdfsad latest snapshot works. Thanks!
Latest snapshot works for me as well! Thanks!
Released 0.2.0 with support of Android projects.
Currently available via maven { url "https://kotlin.bintray.com/kotlinx" }
repository, waiting for JCenter approve
Thanks @qwwdfsad! BTW will this eventually be published to maven central or gradle plugin portal?
Yes, maven central support will be in the next minor release
Released 0.2.1 to maven central