greensopinion / gradle-android-eclipse

A Gradle plug-in that enables generation of Eclipse project files (.project and .classpath) to enable use of the Eclipse IDE for Android projects.
Apache License 2.0
25 stars 12 forks source link

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

Open rubdos opened 5 years ago

rubdos commented 5 years ago

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.

greensopinion commented 5 years ago

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?

rubdos commented 5 years ago

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.

greensopinion commented 5 years ago

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.

schildbach commented 5 years ago

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.

greensopinion commented 4 years ago

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