Closed mttkay closed 9 years ago
Doing now.
Looks like project structure was changed and the build is no longer working:
FAILURE: Build failed with an exception.
* What went wrong:
Task 'release' not found in root project 'rxandroid'.
* Try:
Run gradlew tasks to get a list of available tasks. Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.execution.TaskSelectionException: Task 'release' not found in root project 'rxandroid'.
at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:69)
at org.gradle.execution.commandline.CommandLineTaskParser.parseTasks(CommandLineTaskParser.java:41)
at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAction.java:45)
at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42)
at org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48)
at org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure(ExcludedTaskFilteringBuildConfigurationAction.java:46)
at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42)
at org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48)
at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:38)
at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42)
at org.gradle.execution.DefaultBuildExecuter.select(DefaultBuildExecuter.java:35)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:155)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:46)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.Main.main(Main.java:37)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:55)
Ah shite. Yes we modularized the build. It was passing on Travis. The main
library is now in the 'library' submodule. Is the release task defined by
the Nebula plug-ins? Could you try to run library:release
and see if that
works. Thanks for the quick response!
On Nov 11, 2014 6:20 PM, "Ben Christensen" notifications@github.com wrote:
Looks like project structure was changed and the build is no longer working:
FAILURE: Build failed with an exception.
- What went wrong: Task 'release' not found in root project 'rxandroid'.
- Try: Run gradlew tasks to get a list of available tasks. Run with --info or --debug option to get more log output.
- Exception is: org.gradle.execution.TaskSelectionException: Task 'release' not found in root project 'rxandroid'. at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:69) at org.gradle.execution.commandline.CommandLineTaskParser.parseTasks(CommandLineTaskParser.java:41) at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAction.java:45) at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42) at org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48) at org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure(ExcludedTaskFilteringBuildConfigurationAction.java:46) at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42) at org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48) at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:38) at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42) at org.gradle.execution.DefaultBuildExecuter.select(DefaultBuildExecuter.java:35) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:155) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.Main.doAction(Main.java:46) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at org.gradle.launcher.Main.main(Main.java:37) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:55)
— Reply to this email directly or view it on GitHub https://github.com/ReactiveX/RxAndroid/issues/45#issuecomment-62582046.
I think this problem might have caused this: https://github.com/ReactiveX/RxAndroid/commit/6516ca4da9387eba80e42cea707e838bbef1d178
Sorry about that. For some reason I thought it would retain the artifact name, but of course it doesn't. The library module is now called rxandroid
again.
@benjchristensen that reminds me, I have a related question:
The rxandroid
module defines a compile
dependency on the core library. I was under the assumption that this has the same semantics as in Maven, where the core library would therefore become a transitive dependency for anything that depends on rxandroid
using the same scope. However, that seems not to be the case. In our app POM, if I merely depend on RxAndroid, the core library is imported by IntelliJ as a runtime
dependency! That means, compilation fails, as none of the core library classes are found at compile time.
Why is that? It means that we have to explicitly add a dependency to the core library in the matching version with compile
scope. Perhaps this is just a Gradle/Maven interoperability problem (we haven't migrated to Gradle yet in our app), but if you have any insight into this, please do let me know!
Another problem I'm running into: I would like to be able to publish pre-release versions to the internal SoundCloud Nexus. With our own libraries, we use Gradle's Maven plugin the and uploadArchives
task with the mavenDeployer
.
However, that seems to be incompatible with Nebula, since Nebula adds its own install
and publishing tasks that conflict with this. I looked at https://github.com/nebula-plugins/nebula-publishing-plugin but there is not much in terms of documentation. Would you or @quidryan be able to help with setting this up, so we can publish artifacts for internal testing?
I released version 0.23.0: https://bintray.com/reactivex/RxJava/RxAndroid/0.23.0/view/central
so we can publish artifacts for internal testing
I don't know what needs to be done for this, I'll need @quidryan to provide guidance for that.
where the core library would therefore become a transitive dependency for anything that depends on rxandroid using the same scope.
Definitely that's how it works (or should work), but as you say it shows it as runtime
instead of compile
so that looks like the problem.
Here is the POM: http://search.maven.org/#artifactdetails%7Cio.reactivex%7Crxandroid%7C0.22.0%7Cjar
Here is the dependency it shows:
<dependency>
<groupId>io.reactivex</groupId>
<artifactId>rxjava</artifactId>
<version>1.0.0-rc.6</version>
<scope>runtime</scope>
</dependency>
Here is the old rxjava-android
: http://search.maven.org/#artifactdetails%7Ccom.netflix.rxjava%7Crxjava-android%7C0.20.7%7Cjar
<dependency>
<groupId>com.netflix.rxjava</groupId>
<artifactId>rxjava-core</artifactId>
<version>0.20.7</version>
<scope>compile</scope>
</dependency>
@quidryan Looks like a bug in the build that is marking compile
dependencies as runtime
in the POM.
Concerning runtime and compile, it doesn't matter. It's only relevant during a Maven build, which we're obviously not doing here. When a POM is being consumed as a dependency, compile and runtime scopes are munged together to be considered for transitive dependencies. Stock maven and stock Gradle will not have a problem with this scope value. Your problem might be isolated to your IDE, but I'm pretty confident that the scope is not the source of your problem.
I think what you're referring to is the difference between a project's direct dependencies and transitive dependencies. A project should only reference code that it has a direct dependency on, and not relying on some other module to bring it into the classpath. Gradle used to enforce this by only putting your direct compile dependencies in your javac classpath.
Concerning the mavenDeployer, that's part of Gradle's old publishing system, i.e. apply plugin: 'maven'. These projects are using the new publishing system (http://www.gradle.org/docs/current/userguide/publishing_maven.html), i.e. apply plugin: 'maven-publish'. They don't mix well, and the creation of the install task is partially to force them not being merged. The old system had no way of customizing the resulting pom, and didn't easily allow adding additional binaries, e.g. sources and javadoc jars. As long as you follow the publishing 2.0 semantics you'll be fine.
Gradle doesn't make it easy to override where a module is published to though. The Jenkins Artifactory plugin has a nice trick where they inject an init script to the build to override the publication destination. I'm not familiar if Sonatype has an equivalent. I could also see change the .m2 directory, doing a 'gradle install', and publishing the contents of the new .m2/repository. Jenkins has a feature to make a custom .m2 directory, so this should be too hard to implement.
BTW, putting all the dependencies in runtime is purposeful. Once a module is published, which dependencies it considers compile and which are runtime don't matter anymore, so we hide them all as runtime. This is a gradle default which we agree with.
A project should only reference code that it has a direct dependency on, and not relying on some other module to bring it into the classpath. Gradle used to enforce this by only putting your direct compile dependencies in your javac classpath.
That sounds like good advise. I'll change our POM to explicitly specify the appropriate core version then. And thanks for the in depth explanation!
Sorry for adding a comment to a closed issue, but it looks like 0.23 has not been tagged (or the tag has not been pushed here).
Yes the tag didn't get created for some reason. The last commit for 0.23 was https://github.com/ReactiveX/RxAndroid/commit/f281f090c47fd4f71a4fbd13ae07a39544b94157
We'll need to tag that manually before we can release 0.24.
https://github.com/ReactiveX/RxAndroid/releases/tag/v0.23.0
Thanks Ben.
On Mon, Dec 1, 2014 at 6:03 PM, Ben Christensen notifications@github.com wrote:
Yes the tag didn't get created for some reason. The last commit for 0.23 was f281f09 https://github.com/ReactiveX/RxAndroid/commit/f281f090c47fd4f71a4fbd13ae07a39544b94157
We'll need to tag that manually before we can release 0.24.
— Reply to this email directly or view it on GitHub https://github.com/ReactiveX/RxAndroid/issues/45#issuecomment-65097063.
Matthias Käppler
Engineer
Twitter: https://twitter.com/mttkay
Skype: matthias-sc
SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany | +49 (0)172 2345679
Managing Director: Alexander Ljung | Incorporated in England & Wales with Company No. 6343600 | Local Branch Office | AG Charlottenburg | HRB 110657B
Capture and share your music & audio on SoundCloud http://soundcloud.com/creators
@benjchristensen could you release 0.23 for us? There were some breaking API changes in core 1.0-rc.9 that we had to reflect here, so we should probably ship these changes.
I had to revert to an older RC in our project because of this incompatibility between 0.22 and 1.0-rc.9
Thanks!