jglick / sezpoz

SezPoz: lightweight, annotation-based service loader
29 stars 11 forks source link

Gradle 4.0 changed the default layout of the classes folders cause plugin to fail #12

Open jetersen opened 6 years ago

jetersen commented 6 years ago

Where Gradle 3.x put all classes of groovy and java code into a single directory, Gradle 4 by default creates separate directories for all languages. Unfortunately, this breaks the way SezPoz (the library indexing the Extension annotations) works, meaning that all annotations from java code are effectively ignored.

@jglick just wanted to make you aware of https://github.com/jenkinsci/gradle-jpi-plugin/pull/95

jglick commented 6 years ago

Unclear to me where the “fault” lies here. I am not a Gradle user FWIW. Whatever https://github.com/jenkinsci/gradle-jpi-plugin/pull/97 is doing, I cannot exactly follow.

jetersen commented 6 years ago

@jglick the fault lies in that Gradle 4.x have decided to split out each source so instead of classes/main it is now multiple folders for each source set.

classes/java/main
classes/kotlin/main
classes/groovy/main

sezpoz assumes classes/main

it might be solved by https://github.com/jenkinsci/gradle-jpi-plugin/pull/97 have not had a chance to test it.