Skip to content

Commit 32ae9fc

Browse files
committed
Use Android build system, generate AARs
Also updated to latest & greatest dependencies while I was at it.
1 parent ca2fc48 commit 32ae9fc

File tree

7 files changed

+63
-66
lines changed

7 files changed

+63
-66
lines changed

build.gradle

+9-32
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,17 @@
11
buildscript {
2-
repositories { jcenter() }
3-
dependencies {
4-
classpath 'com.netflix.nebula:gradle-rxjava-project-plugin:2.+'
5-
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:2.+'
2+
repositories {
3+
mavenCentral()
64
}
7-
}
8-
9-
apply plugin: 'rxjava-project'
10-
bintrayUpload.enabled = false
11-
12-
def libraryModules = subprojects.findAll { it.name != 'sample-app' }
13-
configure(libraryModules) {
14-
apply plugin: 'rxjava-project'
15-
apply plugin: 'java'
16-
apply plugin: 'provided-base'
17-
185
dependencies {
19-
compile "io.reactivex:rxjava:$rxJavaVersion"
20-
provided 'com.google.android:android:4.0.1.2'
21-
provided 'com.google.android:support-v4:r7'
22-
23-
// testing
24-
testCompile 'junit:junit:4.12'
25-
testCompile 'org.mockito:mockito-core:1.10.19'
26-
testCompile('org.robolectric:robolectric:2.4') {
27-
exclude group: 'com.android.support'
28-
}
6+
classpath 'com.android.tools.build:gradle:1.2.3'
297
}
308
}
319

32-
// support for snapshot/final releases with the various branches RxJava uses
33-
nebulaRelease {
34-
addReleaseBranchPattern(/\d+\.\d+\.\d+/)
35-
addReleaseBranchPattern('HEAD')
10+
ext {
11+
minSdkVersion = 15
12+
compileSdkVersion = 22
13+
targetSdkVersion = compileSdkVersion
14+
buildToolsVersion = '22.0.1'
3615
}
3716

38-
if (project.hasProperty('release.useLastTag')) {
39-
tasks.prepare.enabled = false
40-
}
17+
apply plugin: 'android-reporting'

gradle.properties

-1
This file was deleted.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sat Dec 13 00:15:28 PST 2014
1+
#Tue Jun 30 13:03:06 CDT 2015
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip

rxandroid/build.gradle

+22-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
// Multi-module modules aren't really supported
2-
version = rootProject.version
3-
4-
test {
5-
testLogging {
6-
exceptionFormat "full"
7-
events "started"
8-
displayGranularity 2
9-
}
1+
apply plugin: 'com.android.library'
2+
3+
android {
4+
compileSdkVersion rootProject.ext.compileSdkVersion
5+
buildToolsVersion rootProject.ext.buildToolsVersion
6+
7+
defaultConfig {
8+
minSdkVersion rootProject.ext.minSdkVersion
9+
targetSdkVersion rootProject.ext.targetSdkVersion
10+
}
11+
}
12+
13+
repositories {
14+
mavenCentral()
15+
}
16+
17+
dependencies {
18+
compile 'io.reactivex:rxjava:1.0.12'
19+
20+
testCompile 'junit:junit:4.12'
21+
testCompile 'org.mockito:mockito-core:1.10.19'
22+
testCompile 'org.robolectric:robolectric:2.4'
1023
}
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
-->
15+
<manifest package="rx.android" />

sample-app/build.gradle

+13-20
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
1-
buildscript {
2-
repositories { jcenter() }
3-
dependencies {
4-
classpath 'com.android.tools.build:gradle:1.2.3'
5-
}
6-
}
7-
8-
repositories {
9-
jcenter()
10-
}
11-
121
apply plugin: 'com.android.application'
132

143
android {
15-
compileSdkVersion 22
16-
buildToolsVersion "22.0.1"
4+
compileSdkVersion rootProject.ext.compileSdkVersion
5+
buildToolsVersion rootProject.ext.buildToolsVersion
6+
7+
defaultConfig {
8+
minSdkVersion rootProject.ext.minSdkVersion
9+
targetSdkVersion rootProject.ext.targetSdkVersion
10+
versionCode 1
11+
versionName '1.0'
12+
}
13+
}
1714

18-
defaultConfig {
19-
minSdkVersion 14
20-
targetSdkVersion 22
21-
versionCode 1
22-
versionName "1.0"
23-
}
15+
repositories {
16+
mavenCentral()
2417
}
2518

2619
dependencies {
27-
compile project(':rxandroid')
20+
compile project(':rxandroid')
2821
}

settings.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
rootProject.name='rxandroid-root'
22

3-
include 'rxandroid'
4-
include 'sample-app'
3+
include ':rxandroid'
4+
include ':sample-app'

0 commit comments

Comments
 (0)