buildship
buildship copied to clipboard
compileOnlyApi support
We've recently started using gradle's compileOnlyApi
. It looks like that landed in gradle 6.7. Anyway, this doesn't work with buildship.
Expected Behavior
My project config looks something like:
-
:lib
configurations {
extra
compileOnlyApi.extendsFrom(extra)
}
dependencies {
extra project('extra')
}
-
:lib:extra
- normal java project without anything special in it -
:user
dependencies {
compileOnly project(':lib')
}
When I import the project into Eclipse with buildship the :user
project should compile with :lib
and :lib:extra
available.
Current Behavior
When I import the project into Eclipse with buildship the :user
project only compiles with :lib
available. Not :lib:extra
.
Context
I'm a full time contributor to Elasticsearch. 85% of the full time contributors to Elasticsearch use IntelliJ. CI uses gradle. 15% of us stubbornly cling to Eclipse, partially because we're used to it and partially because we believe it's fairly common for random folks on the internet to use Eclipse for Java and we think it should work. Buildship works a lot better than ./gradlew eclipse
.
Steps to Reproduce
Instructions above. You could clone Elasticsearch at 1b617f1d7426f596150724d431c807fe82c408ab
and import it into Eclipse. It'll import with a few errors that you can ignore for this reproduction. The errors you are looking for are when compiling ProcessorsWhitelistExtension
.
Your Environment
=======================================
Elasticsearch Build Hamster says Hello!
Gradle Version : 7.1.1
OS Info : Linux 5.12.10-arch1-1 (amd64)
JDK Version : 16.0.1 (Oracle)
JAVA_HOME : /home/nik9000/Bin/jdk-16.0.1
Random Testing Seed : AC525B91E9A61B89
In FIPS 140 mode : false
=======================================
Instructions above. You could clone Elasticsearch at
1b617f1d7426f596150724d431c807fe82c408ab
and import it into Eclipse. It'll import with a few errors that you can ignore for this reproduction. The errors you are looking for are when compilingProcessorsWhitelistExtension
.
Honestly this is probably too much work. You'd have to follow the import instructions in CONTRIBUTING.md which just seems like more work than you are likely to want to do. If you need a reproduction repo I can build one.