Gradle Builds: Change provided to testCompile#1394
Conversation
|
RxJava-pull-requests #1336 FAILURE |
There was a problem hiding this comment.
@benjchristensen do you know why use provide here? Looks most of other projects also use provided. I suppose testCompile may be better for these test libraries. I changed provided to testCompile in rxjava-scala. Looks it works.
dependencies {
compile 'org.scala-lang:scala-library:2.10.+'
compile project(':rxjava-core')
testCompile 'junit:junit-dep:4.10'
testCompile 'org.mockito:mockito-core:1.8.5'
testCompile 'org.scalatest:scalatest_2.10:1.9.1'
}
tasks.compileScala {
classpath = classpath + (configurations.compile + configurations.provided)
}
tasks.compileExamplesScala {
classpath = classpath + files(compileScala.destinationDir) + (configurations.compile + configurations.testCompile)
}There was a problem hiding this comment.
The use of provided dates back to over a year ago and is no longer the correct approach. We should move to testCompile. I haven't merged this yet because it failed to build and wasn't obvious why. Also, if we're changing it, we should completely remove provided.
There was a problem hiding this comment.
This is all voodoo for me, but I do know that whenever I refresh my repo, I need to install everything that is "provided" by hand, which is not what I would like and expect.
|
RxJava-pull-requests #1361 SUCCESS |
|
Cleaned up more provided references |
|
LGTM. |
|
Could you also fix other |
|
RxJava-pull-requests #1363 SUCCESS |
There was a problem hiding this comment.
For Android, here should be provided because rxjava-android needs to work with different Android versions.
There was a problem hiding this comment.
@zsxwing This specifies how this project is built (and that during the build these dependencies can be downloaded from Maven repo). You can still use different android jars for runtime linkage.
There was a problem hiding this comment.
Actually, it's an Android special one. Using these libraries in android development is much more like using JDK runtime. It's better that we don't add these dependencies to rxjava-android. gradle android plugin will set up the environment according to the settings for an android project, such as:
apply plugin: 'android'
android {
buildToolsVersion "19.0.3"
compileSdkVersion 19
}
There was a problem hiding this comment.
So you suggest removing both com.google.android references?
There was a problem hiding this comment.
No. I suggest changing back to provided.
|
RxJava-pull-requests #1370 FAILURE |
Gradle now generates correct eclipse dependencies
|
RxJava-pull-requests #1371 SUCCESS |
|
@zsxwing with this last commit I removed support for provided in the general build process, so I would like to suggest staying with compile for now. I looked into switching to http://tools.android.com/tech-docs/new-build-system/user-guide The changes will be fairly invasive, as the |
|
@gliptak sorry that I may explain unclearly. I mean let's keep the following lines: For the android gradle plugin, I mean when some projects depends on rxjava-android, they can use android gradle plugin. I don't mean that rxjava-android needs to use it. So for rxjava-android, I suggest we only need to do the following changes: |
|
RxJava-pull-requests #1376 FAILURE |
|
Hmm ... The build failed with a possibly unrelated test failure (I started seeing failures locally after rebasing on the backpressure changes) |
|
Ignore |
There was a problem hiding this comment.
Could you indent these new test files with 4-spaces rather than tabs?
|
RxJava-pull-requests #1378 SUCCESS |
|
LGTM. Tested most projects in eclipse and IntelliJ IDEA. Didn't test rxjava-clojure, rxjava-groovy, rxjava-jruby and rxjava-kotlin because I didn't install these language plugins in my IDES. Thanks, @gliptak |
|
👍 |
Gradle Builds: Change provided to testCompile
Gradle now generates correct eclipse dependencies