-
Notifications
You must be signed in to change notification settings - Fork 209
Plugin is publishing empty sources jar #262
Comments
@bruno-ortiz if it would be useful if you could please confirm whether your project has always been using Kotlin or not. |
Here is what I've found when trying to deploy from windows machine and travis. // Generates Kotlin sources
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
// Adds a dependency to upload (more about it later)
bintrayUpload.dependsOn assemble And here is a task-list that is generated on my windows machine: $ ./gradlew -m bintrayUpload -PbintrayUser=motorro -PbintrayKey=XXX -PdryRun=true --no-daemon
:base:compileKotlin SKIPPED
:base:compileJava SKIPPED
:base:processResources SKIPPED
:base:classes SKIPPED
:base:inspectClassesForKotlinIC SKIPPED
:base:jar SKIPPED
:base:sourcesJar SKIPPED
:base:assemble SKIPPED
:base:bintrayUpload SKIPPED Compare to task list from Linux: $ ./gradlew -m bintrayUpload -PbintrayUser=motorro -PbintrayKey=XXX -PdryRun=true --no-daemon
:base:compileKotlin SKIPPED
:base:compileJava SKIPPED
:base:processResources SKIPPED
:base:classes SKIPPED
:base:inspectClassesForKotlinIC SKIPPED
:base:jar SKIPPED
:base:sourcesJar SKIPPED
:base:assemble SKIPPED
:base:generatePomFileForMavenPublication SKIPPED
:base:javadoc SKIPPED
:base:genereateJavadocsJarForMavenPublication SKIPPED
:base:genereateSourcesJarForMavenPublication SKIPPED
:base:publishMavenPublicationToMavenLocal SKIPPED
:base:bintrayUpload SKIPPED Notice the task-list in Linux environment include As a workaround for this one could disable individual tasks as @mr-archano suggests in #270 or disable the |
@motorro thanks for the headsup.
It sounds like the issue you are facing might be slightly different. Could you please ensure that you can reproduce the issue even after a project
Instead of defining a new |
@mr-archano
Just forgot it in my original post. And it is a separate issue for sure - I've just written it here to illustrate the problem search path. Spawned another one: #271
Yes, sure. But I've "discovered" that task only yesterday when came across Travis was uploading empty source jars. While the source generation for Kotlin code problem was the original one and I had no problem publishing from windows using your plugin. So this problem for me comes in a somewhat reversed order :) |
Thanks very much @motorro for creating the new issue. I have shortage of windows machines to try to replicate the issue myself, I might need your help with this if you;re up for it :)
Don't worry about how much experience you have with Gradle, we can figure it out all together - this is the beauty of opensource projects! |
Deal 👍 |
@motorro FYI we already have a functional test in place to check other things, so maybe you can look into how to add a case in there (we might need to introduce a 3rd type of project that is applying the kotlin plugin though): https://github.com/novoda/bintray-release/blob/master/plugin/core/src/test/groovy/com/novoda/gradle/release/ReleasePluginTest.groovy |
References: novoda#271 novoda#262
@mr-archano I've managed to:
|
Here are the failing tests that reproduce the current issue:
|
@motorro thanks for the updates! I have spent last week travelling, but I am planning to take a look at this as soon as I can. I will keep you posted :) |
I'm using the following to fix the sources jar in one my projects until the plugin is updated to fix pure Kotlin projects:
|
Scenario
When publishing my project artifacts to bintray or mavenLocal, since version 0.9, all directories inside the source jar of the project are empty.
Config
All configurations can be seen here:
https://github.com/GuiaBolso/hyperloop
Thanks
The text was updated successfully, but these errors were encountered: