gradle-android-eclipse icon indicating copy to clipboard operation
gradle-android-eclipse copied to clipboard

Usage with Gradle 4: `implementation` dependencies et al.

Open rubdos opened this issue 6 years ago • 5 comments

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.

rubdos avatar Nov 29 '18 15:11 rubdos

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?

greensopinion avatar Nov 29 '18 16:11 greensopinion

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.

rubdos avatar Nov 29 '18 17:11 rubdos

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.

greensopinion avatar Dec 07 '18 16:12 greensopinion

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.

schildbach avatar Apr 26 '19 15:04 schildbach

Potentially some work to be done here, see https://github.com/greensopinion/gradle-android-eclipse/wiki/2020-experiment

greensopinion avatar Feb 19 '20 16:02 greensopinion