Skip to content

Commit

Permalink
Merge pull request #145 from benjchristensen/issue-143
Browse files Browse the repository at this point in the history
Support 'provided' dependencies in IntelliJ Idea build
  • Loading branch information
benjchristensen committed Feb 14, 2013
2 parents aca523c + a7d0e93 commit 23f04cc
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 26 deletions.
10 changes: 8 additions & 2 deletions language-adaptors/rxjava-clojure/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,17 @@ eclipse {
}
}

idea {
module {
// include 'provided' dependencies on the classpath
scopes.PROVIDED.plus += configurations.provided
}
}


// setup Eclipse
eclipse {
classpath {
//you can tweak the classpath of the Eclipse project by adding extra configurations:
// include 'provided' dependencies on the classpath
plusConfigurations += configurations.provided

downloadSources = true
Expand Down
10 changes: 8 additions & 2 deletions language-adaptors/rxjava-groovy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ configurations {
// include 'examples' in build task
build.dependsOn examplesClasses

// setup Eclipse
eclipse {
classpath {
//you can tweak the classpath of the Eclipse project by adding extra configurations:
// include 'provided' dependencies on the classpath
plusConfigurations += configurations.provided

downloadSources = true
downloadJavadoc = true
}
}

idea {
module {
// include 'provided' dependencies on the classpath
scopes.PROVIDED.plus += configurations.provided
}
}
9 changes: 8 additions & 1 deletion language-adaptors/rxjava-jruby/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,17 @@ dependencies {

eclipse {
classpath {
//you can tweak the classpath of the Eclipse project by adding extra configurations:
// include 'provided' dependencies on the classpath
plusConfigurations += configurations.provided

downloadSources = true
downloadJavadoc = true
}
}

idea {
module {
// include 'provided' dependencies on the classpath
scopes.PROVIDED.plus += configurations.provided
}
}
9 changes: 8 additions & 1 deletion language-adaptors/rxjava-scala/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@ task test(overwrite: true, dependsOn: testClasses) << {

eclipse {
classpath {
//you can tweak the classpath of the Eclipse project by adding extra configurations:
// include 'provided' dependencies on the classpath
plusConfigurations += configurations.provided

downloadSources = true
downloadJavadoc = true
}
}

idea {
module {
// include 'provided' dependencies on the classpath
scopes.PROVIDED.plus += configurations.provided
}
}
9 changes: 8 additions & 1 deletion rxjava-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@ dependencies {

eclipse {
classpath {
//you can tweak the classpath of the Eclipse project by adding extra configurations:
// include 'provided' dependencies on the classpath
plusConfigurations += configurations.provided

downloadSources = true
downloadJavadoc = true
}
}

idea {
module {
// include 'provided' dependencies on the classpath
scopes.PROVIDED.plus += configurations.provided
}
}

javadoc {
// we do not want the org.rx.operations package include
exclude '**/operations/**'
Expand Down
37 changes: 18 additions & 19 deletions rxjava-core/src/main/java/rx/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private Observable(Func1<Observer<T>, Subscription> onSubscribe, boolean isTrust
* For more information see the <a href="https://github.com/Netflix/RxJava/wiki/Observable">RxJava Wiki</a>
*
*
* @param Observer
* @param observer
* @return a {@link Subscription} reference that allows observers
* to stop receiving notifications before the provider has finished sending them
*/
Expand Down Expand Up @@ -447,9 +447,9 @@ private static <T> Observable<T> _create(Func1<Observer<T>, Subscription> func)
* as appropriate, and returns a {@link Subscription} to allow canceling the subscription (if applicable)
* @return an Observable that, when an {@link Observer} subscribes to it, will execute the given function
*/
public static <T> Observable<T> create(final Object callback) {
public static <T> Observable<T> create(final Object func) {
@SuppressWarnings("rawtypes")
final FuncN _f = Functions.from(callback);
final FuncN _f = Functions.from(func);
return create(new Func1<Observer<T>, Subscription>() {

@Override
Expand Down Expand Up @@ -509,7 +509,7 @@ public static <T> Observable<T> filter(Observable<T> that, Func1<T, Boolean> pre
*
* @param that
* the Observable to filter
* @param predicate
* @param function
* a function that evaluates the items emitted by the source Observable, returning <code>true</code> if they pass the filter
* @return an Observable that emits only those items in the original Observable that the filter evaluates as true
*/
Expand Down Expand Up @@ -544,7 +544,7 @@ public static <T> Observable<T> from(Iterable<T> iterable) {
/**
* Converts an Array to an Observable sequence.
*
* @param iterable
* @param items
* the source Array
* @param <T>
* the type of items in the Array, and the type of items emitted by the resulting Observable
Expand Down Expand Up @@ -574,7 +574,7 @@ public static Observable<Integer> range(int start, int count) {
* <p>
* To convert any object into an Observable that emits that object, pass that object into the <code>just</code> method.
* <p>
* This is similar to the {@link toObservable} method, except that <code>toObservable</code> will convert
* This is similar to the {@link #toObservable} method, except that <code>toObservable</code> will convert
* an {@link Iterable} object into an Observable that emits each of the items in the {@link Iterable}, one
* at a time, while the <code>just</code> method would convert the {@link Iterable} into an Observable
* that emits the entire {@link Iterable} as a single item.
Expand Down Expand Up @@ -647,9 +647,9 @@ public static <T, R> Observable<R> map(Observable<T> sequence, Func1<T, R> func)
* @return an Observable that is the result of applying the transformation function to each item
* in the sequence emitted by the source Observable
*/
public static <T, R> Observable<R> map(Observable<T> sequence, final Object function) {
public static <T, R> Observable<R> map(Observable<T> sequence, final Object func) {
@SuppressWarnings("rawtypes")
final FuncN _f = Functions.from(function);
final FuncN _f = Functions.from(func);
return map(sequence, new Func1<T, R>() {

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -707,9 +707,9 @@ public static <T, R> Observable<R> mapMany(Observable<T> sequence, Func1<T, Obse
* function to each item emitted by the source Observable and merging the results of
* the Observables obtained from this transformation
*/
public static <T, R> Observable<R> mapMany(Observable<T> sequence, final Object function) {
public static <T, R> Observable<R> mapMany(Observable<T> sequence, final Object func) {
@SuppressWarnings("rawtypes")
final FuncN _f = Functions.from(function);
final FuncN _f = Functions.from(func);
return mapMany(sequence, new Func1<T, R>() {

@SuppressWarnings("unchecked")
Expand All @@ -726,10 +726,10 @@ public R call(T t1) {
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/materialize.png">
*
* @param source
* @param sequence
* An observable sequence of elements to project.
* @return An observable sequence whose elements are the result of materializing the notifications of the given sequence.
* @see http://msdn.microsoft.com/en-us/library/hh229453(v=VS.103).aspx
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229453(v=VS.103).aspx">MSDN: Observable.Materialize</a>
*/
public static <T> Observable<Notification<T>> materialize(final Observable<T> sequence) {
return _create(OperationMaterialize.materialize(sequence));
Expand All @@ -746,7 +746,7 @@ public static <T> Observable<Notification<T>> materialize(final Observable<T> se
* a list of Observables that emit sequences of items
* @return an Observable that emits a sequence of elements that are the result of flattening the
* output from the <code>source</code> list of Observables
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229099(v=vs.103).aspx">MSDN: Observable.Merge Method</a>
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229099(v=vs.103).aspx">MSDN: Observable.Merge</a>
*/
public static <T> Observable<T> merge(List<Observable<T>> source) {
return _create(OperationMerge.merge(source));
Expand Down Expand Up @@ -1003,7 +1003,7 @@ public Observable<T> call(Exception e) {
*
* @param that
* the source Observable
* @param resumeFunction
* @param resumeSequence
* a function that returns an Observable that will take over if the source Observable
* encounters an error
* @return the source Observable, with its behavior modified as described
Expand Down Expand Up @@ -1461,7 +1461,7 @@ public static <T> Observable<T> toObservable(Future<T> future, long time, TimeUn
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/toObservable.png">
*
* @param iterable
* @param items
* the source Array
* @param <T>
* the type of items in the Array, and the type of items emitted by the resulting
Expand Down Expand Up @@ -1612,7 +1612,7 @@ private static <T> Observable<Boolean> sequenceEqual(Observable<T> first, Observ
* one source Observable
* @param w1
* another source Observable
* @param reduceFunction
* @param function
* a function that, when applied to an item emitted by each of the source Observables,
* results in a value that will be emitted by the resulting Observable
* @return an Observable that emits the zipped results
Expand Down Expand Up @@ -1918,7 +1918,7 @@ public Observable<R> call(T t1) {
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/materialize.png">
*
* @return An observable sequence whose elements are the result of materializing the notifications of the given sequence.
* @see http://msdn.microsoft.com/en-us/library/hh229453(v=VS.103).aspx
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229453(v=VS.103).aspx">MSDN: Observable.materialize</a>
*/
public Observable<Notification<T>> materialize() {
return materialize(this);
Expand Down Expand Up @@ -2050,8 +2050,7 @@ public Observable<T> onErrorReturn(Func1<Exception, T> resumeFunction) {
* <p>
* You can use this to prevent errors from propagating or to supply fallback data should errors
* be encountered.
*
* @param that
*
* @param resumeFunction
* @return the original Observable with appropriately modified behavior
*/
Expand Down

0 comments on commit 23f04cc

Please sign in to comment.