Skip to content

Commit

Permalink
Use Android build system, generate AARs
Browse files Browse the repository at this point in the history
Also updated to latest & greatest dependencies while I was at it.
  • Loading branch information
dlew committed Jun 30, 2015
1 parent ca2fc48 commit 32ae9fc
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 66 deletions.
41 changes: 9 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,40 +1,17 @@
buildscript {
repositories { jcenter() }
dependencies {
classpath 'com.netflix.nebula:gradle-rxjava-project-plugin:2.+'
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:2.+'
repositories {
mavenCentral()
}
}

apply plugin: 'rxjava-project'
bintrayUpload.enabled = false

def libraryModules = subprojects.findAll { it.name != 'sample-app' }
configure(libraryModules) {
apply plugin: 'rxjava-project'
apply plugin: 'java'
apply plugin: 'provided-base'

dependencies {
compile "io.reactivex:rxjava:$rxJavaVersion"
provided 'com.google.android:android:4.0.1.2'
provided 'com.google.android:support-v4:r7'

// testing
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile('org.robolectric:robolectric:2.4') {
exclude group: 'com.android.support'
}
classpath 'com.android.tools.build:gradle:1.2.3'
}
}

// support for snapshot/final releases with the various branches RxJava uses
nebulaRelease {
addReleaseBranchPattern(/\d+\.\d+\.\d+/)
addReleaseBranchPattern('HEAD')
ext {
minSdkVersion = 15
compileSdkVersion = 22
targetSdkVersion = compileSdkVersion
buildToolsVersion = '22.0.1'
}

if (project.hasProperty('release.useLastTag')) {
tasks.prepare.enabled = false
}
apply plugin: 'android-reporting'
1 change: 0 additions & 1 deletion gradle.properties

This file was deleted.

4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Dec 13 00:15:28 PST 2014
#Tue Jun 30 13:03:06 CDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
31 changes: 22 additions & 9 deletions rxandroid/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
// Multi-module modules aren't really supported
version = rootProject.version

test {
testLogging {
exceptionFormat "full"
events "started"
displayGranularity 2
}
apply plugin: 'com.android.library'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
}
}

repositories {
mavenCentral()
}

dependencies {
compile 'io.reactivex:rxjava:1.0.12'

testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'org.robolectric:robolectric:2.4'
}
15 changes: 15 additions & 0 deletions rxandroid/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
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.
-->
<manifest package="rx.android" />
33 changes: 13 additions & 20 deletions sample-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
buildscript {
repositories { jcenter() }
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}

repositories {
jcenter()
}

apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName '1.0'
}
}

defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
repositories {
mavenCentral()
}

dependencies {
compile project(':rxandroid')
compile project(':rxandroid')
}
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rootProject.name='rxandroid-root'

include 'rxandroid'
include 'sample-app'
include ':rxandroid'
include ':sample-app'

1 comment on commit 32ae9fc

@Buddhdism
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2

Please sign in to comment.