Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

Support automatic creation of IDEA library on project import #43

Closed
cbeams opened this issue May 30, 2016 · 4 comments
Closed

Support automatic creation of IDEA library on project import #43

cbeams opened this issue May 30, 2016 · 4 comments

Comments

@cbeams
Copy link
Contributor

cbeams commented May 30, 2016

Per the current instructions for working with our samples, it is necessary to run ./gradlew patchIdeaConfig in order to create an IDEA library containing all the correct Kotlin and Gradle classpath entries for the IDEA project.

This should be done automatically on project import. When complete, we'll be able to eliminate the patchIdeaConfig step completely.

@cbeams cbeams added this to the 1.0.0-M2 milestone May 30, 2016
@cbeams
Copy link
Contributor Author

cbeams commented May 30, 2016

@ligee, I've assigned this to you and put it In Progress, as I believe that reflects our last conversation. Please comment and/or otherwise update the issue if anything has changed.

cbeams referenced this issue in gradle/gradle May 30, 2016
This change is necessary in order to support quick documentation and
source navigation for Kotlin-based build scripts in IDEA. It is a
temporary workaround and will be reverted as soon as a more complete
solution is available in the Kotlin IDEA plugin. Overall, the inclusion
of source files adds approximately 5 MB to the `-bin` distribution zip.

Variations on this commit have been applied and reverted a number of
times in the process of diagnosing Javadoc-related CI failures it
caused. In the end, the cause of these failures is not precisely
understood, but is triggered by situations in where there are two
classes (and thus two source files) having the same name, e.g.
`StandardOutputCapture`, but living in two different packages, e.g.
`org.gradle.logging` and `org.gradle.internal.logging`. Javadoc "gets
confused" in this scenario and fails with an error claiming that one of
the two source files does not contain the class it is supposed to. An
example of this error can be found at http://tinyurl.com/zymj3v5.

There are roughly 94 instances of identically-named classes living in
differently-named packages throughout Gradle's production codebase, and
the majority of them exist because the given class exists both in an
"internal" package and in a "public" package, usually with one being
deprecated in favor of the other.

This commit simply excludes all "internal" packages when copying source
files into binary jars, and in doing so eliminates all (or enough) of
the identically-named classes such that Javadoc can now succeed.

Note that for some reason, the Javadoc failures in question were only
replicable on Linux under a 1.7 JDK (1.8 was not tested). The specific
command that, prior to this commit, would always cause a failure was

    ./gradlew :docs:javadocAll

With this commit applied, the command above completes without error in
the above-mentioned Linux + JDK 1.7 environement.
@cbeams cbeams changed the title Support automatic creation of IDEA project library Support automatic creation of IDEA library on project import May 31, 2016
@cbeams
Copy link
Contributor Author

cbeams commented May 31, 2016

This feature is blocking completion of #55.

@cbeams
Copy link
Contributor Author

cbeams commented Jun 13, 2016

@ligee, could you provide an update on this? Still possible in time for M2?

@bamboo
Copy link
Member

bamboo commented Jun 17, 2016

Blocked by #76.

@bamboo bamboo closed this as completed in 2ed5c20 Jun 20, 2016
cbeams added a commit that referenced this issue Jun 20, 2016
These tasks are obsolete as of the resolution of #26 and #43.

Resolves #79
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants