Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rx-netty/examples build. #138

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions examples/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6

dependencies {
compile project(':rx-netty')
testCompile 'junit:junit:4.10'
}
34 changes: 0 additions & 34 deletions rx-netty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,50 +20,23 @@ targetCompatibility = JavaVersion.VERSION_1_6
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// make 'examples' use the same classpath
configurations {
// add new configuration
examples

//adding a configuration that extends existing configuration:
//(testCompile was added by the java plugin)
examples.extendsFrom(compile)
examplesCompile.extendsFrom(compile)
examplesRuntime.extendsFrom runtime
}

sourceSets.test.java.srcDir 'src/main/java'

tasks.withType(Javadoc).each {
it.classpath = sourceSets.main.compileClasspath
}

//include /src/examples folder
sourceSets {
examples {
// no idea why this is needed
java.srcDirs = []
}
}

//include 'examples' in build task
tasks.build { dependsOn(examplesClasses) }

dependencies {
compile "io.netty:netty-codec-http:${netty_version}"
compile "com.netflix.rxjava:rxjava-core:${rxjava_version}"
// we only support Groovy in the /src/examples/ code
examples 'org.codehaus.groovy:groovy-all:[2.1,)'

examplesRuntime 'com.netflix.rxjava:rxjava-groovy:[0.17,)'
testCompile 'junit:junit:4.10'
}

eclipse {
classpath {
// include 'provided' dependencies on the classpath
plusConfigurations += configurations.provided
plusConfigurations += configurations.examples

downloadSources = true
downloadJavadoc = true
Expand All @@ -75,16 +48,9 @@ idea {
// include 'provided' dependencies on the classpath
scopes.PROVIDED.plus += configurations.provided
scopes.PROVIDED.plus += configurations.provided
scopes.COMPILE.plus += configurations.examples
scopes.RUNTIME.plus += configurations.examplesRuntime
}
}


tasks.compileExamplesGroovy {
classpath = classpath + files(compileGroovy.destinationDir) + (configurations.compile + configurations.examples)
}

jar {
manifest {
name = 'rx-netty'
Expand Down
3 changes: 1 addition & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
rootProject.name='RxNetty'
include 'rx-netty', 'rx-netty-remote-observable', 'rx-netty-contexts'

include 'rx-netty', 'rx-netty-remote-observable', 'rx-netty-contexts', 'examples'