Skip to main content
15 events
when toggle format what by license comment
Aug 31, 2023 at 11:50 review Suggested edits
Aug 31, 2023 at 19:41
Jan 26, 2023 at 0:47 review Suggested edits
Jan 26, 2023 at 11:43
Jun 2, 2021 at 21:21 comment added Roshana Pitigala Could not get unknown property 'classes' for project ':xxxx' of type org.gradle.api.Project.
Mar 29, 2015 at 9:57 comment added rwitzel For me the dependsOn specification for the javadoc task is required (Gradle 2.3). Otherwise the created jar would be empty. The dependsOn specification for the classes task looks redundant. Why should one build the classes to create a source.jar? In the book Gradle In Action such a specification does not exist as well.
Mar 7, 2015 at 20:57 comment added Martin Andersson Elaborated on the empty-jar issue here.
Mar 7, 2015 at 20:34 comment added Martin Andersson Doug Ayers, I think you are right in theory, but without the dependsOn declaration, my Gradle (2.3) will build an empty jar.
Mar 7, 2015 at 20:33 comment added Martin Andersson allSource do exist?
Aug 19, 2014 at 7:52 comment added Daniele Segato allSources is not available anymore.
Nov 22, 2013 at 19:55 comment added JJD How can I reference the generated .jar files in Android Studio? Where do I have to put them?
Oct 25, 2013 at 12:06 comment added Mikezx6r If I'm not mistaken you also don't need the dependsOn specifications in the class. Gradle looks at the inputs for a task, determines where they came from, and automatically creates a dependency. e.g. javadocJar pulls files from javadoc, therefore Gradle will add the dependsOn javadoc automatically.
Oct 9, 2013 at 18:06 comment added Doug Ayers In my situation, the allSource property was not picking up the .java files, I had to change my sourcesJar task to use: from sourceSets.main.java, sourceSets.main.resources
Jul 13, 2012 at 17:57 comment added Paul D. Eden In case it matters, the project referred to is hsqldb 2.2.8.
Jul 13, 2012 at 17:32 comment added Paul D. Eden I'm accepting this answer based on the great specifics and my assumption it works on gradle projects that use the java plugin. Unfortunately, it doesn't work in my case as the project I'm using doesn't use the java plugin. The error I get is "Could not find property 'sourceSets' on task ':sourcesJar'."
Jul 13, 2012 at 17:31 vote accept Paul D. Eden
Jul 13, 2012 at 17:05 history answered JB Nizet CC BY-SA 3.0