gradle-android-eclipse
gradle-android-eclipse copied to clipboard
Usage with Gradle 4: `implementation` dependencies et al.
The same issue as with this plugin: since Gradle 4, dependencies specified using compile and testCompile are deprecated, and the successors (implementation and testImplementation) and the like cannot be directly accessed.
But unlike the other AAR plugin, for this one there's a pretty "okay" workaround:
apply plugin: 'com.greensopinion.gradle-android-eclipse'
configurations {
eclipseConfig.extendsFrom implementation
eclipseTestConfig.extendsFrom testImplementation
}
eclipse {
classpath {
plusConfigurations += [
configurations.eclipseConfig,
configurations.eclipseTestConfig,
]
downloadSources = true
}
}
Seems to do the trick.
Thanks for the suggested workaround. I've been delaying dealing with this issue. I was considering an upstream contribution to the gradle eclipse plug-in. What do you think?
upstream contribution to the gradle eclipse plug-in
Does that mean that all the gradle-android-eclipse work would be included over there? I'm not sure whether they would accept that, since the eclipse plugin is not specifically targetted to Android.
I'm not sure. I haven't looked into it deeply enough to know if this issue is an Android-specific thing, or if it's a change in common practices used with Gradle. I agree, if it's Android-specific it doesn't really make sense to try to contribute upstream.
For now I think the two plugins should stay separated. One problem of inclusion into the gradle eclipse plug-in would be that releases would be tied to Gradle.
Potentially some work to be done here, see https://github.com/greensopinion/gradle-android-eclipse/wiki/2020-experiment