Skip to content

Commit

Permalink
Merge 1.0 alpha branch (#46)
Browse files Browse the repository at this point in the history
* Add observer tag

* annotation processor

* fix lifecycle test

* fix tests

* Add observer tag

* annotation processor

* fix lifecycle test

* fix tests

* Clean up tests and bump version to 1.0.0-SNAPSHOT

* address comments

* Create Processor Project, DRY gradle dependencies (#37)

* Move rxgroups-processor to separate project, DRY multi-module dependencies

* renamen package to processor, fix spacing

* rxgroups-android tests need to depend on processor

* Switch line limit back to 100, update gradle to 3.5

* get checkstyle to work with gradle 3.5

* Make ObservableGroup#resubscribe visible to generated code, artificat for rx-processor (#38)

* Have rxgroups-processor upload build artifact

Use variable for repo urls

* Make ObseravbleGroup#resubscribe public for generated code. Remove deprecated use of Observable#create

* Use getter/setter with JavaDoc

* fix checkstyle

* Add back javadoc quiet mode

* Use subclass to control visability

* Make mulitiple observer support more clear (#39)

* Make mulitiple observer support more clear

* fix checkystyle

* Consistently use the term observableTag for user facing code, and observerTag where necessary internally

* Add test for multiple observers, cancelAndRemoveAllWithTag

* Update all tests to reflect the use of observerTag instead of null in 1:1 case

* remove extra space

* Fix javadocs

* Remove cancelling by observableTag

* remove unused observableTag code

* fix another typo

* Add tagged observer to allow for custom tag (#40)

* Add tagged observer to allow for using a non-auto generated observer tag in exceptional circumstances

* Support auto resubcription with tagged observer

* add tests

* Add AutoTag, NonResubscribableTag, safeInitialize (#41)

* Add AutoTag, safeIntialization, and NonResubscribingTag

* revert gradle change

* Fix some comments

* Change to NonResubscribable

* fix test

* propogate cancel and remove all change to lifecyclemanager

* remove duplicated method

* fix test name

* Cache missing constructors, add super class initialization support

change some access

fix some more

* Make GroupLifecycleManager properly shadow methods in ObservableGroup

* disable check style for mock generated code

* reduce chance of concurrent modification exception

* Add supression comment filter

* Add filecontentsholder to have checkstyle actually read turn off comments

* remove duplicated remove code

* Add AnnotationProcessor code gen tests

* use config build tools version

* fix no checkstyle check

* add missing new lines

* Change version to 1.0.0-alpha1

* Prevent null tag collisions by resorting to NonResubscribingTag, if getTag returns null

* add test for custom tagging

* eliminate double map lookup

* Migrate to RxJava2 (#42)

* Migrate to RxJava2 for Observables

cleanup

* update tests and sample for rxjava2

* update travis

* Fix test checkstyle

* fix line alignment

* Fix some documentation

* Fix continuation idents, use 2 spaces in ObservableGroup (#43)

* bump version (#44)
  • Loading branch information
Ben Schwab authored Jan 2, 2018
1 parent da38023 commit 697b9bc
Show file tree
Hide file tree
Showing 68 changed files with 2,426 additions and 1,569 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ android:
components:
- tools
- platform-tools
- build-tools-25.0.2
- build-tools-25.0.3
- android-25
- extra-android-m2repository
- extra-android-support
Expand Down
60 changes: 38 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,33 +1,49 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
subprojects {
apply from: "../gradle/dependencies.gradle"

buildscript {
buildscript {
repositories {
jcenter()
}

dependencies {
classpath dep.androidPlugin
classpath dep.gradleNexus
}
}
repositories {
jcenter()
}
dependencies {
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
classpath 'com.android.tools.build:gradle:2.2.3'
}
}

allprojects {
repositories {
jcenter()
group = GROUP
version = VERSION_NAME

tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}

if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
if (!(project.name.equals('rxgroups-processor')
|| project.name.equals('rxgroups-annotation-test'))) {
apply plugin: 'checkstyle'

checkstyle {
toolVersion = '7.6.1'
configFile rootProject.file('checkstyle.xml')
configProperties = ['checkstyle.cache.file': rootProject.file('build/checkstyle.cache')]
showViolations true
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
task checkstyle(type: Checkstyle) {
source 'src/main/java'
include '**/*.java'

def isCi() {
project.hasProperty('CI') && CI.equals('true')
classpath = files()
}

afterEvaluate {
if (project.tasks.findByName('check')) {
check.dependsOn('checkstyle')
}
}
}
}
10 changes: 7 additions & 3 deletions checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<module name="Checker">
<module name="NewlineAtEndOfFile"/>
Expand All @@ -14,6 +14,8 @@
<property name="message" value="Line has trailing spaces."/>
</module>

<module name="SuppressionCommentFilter"/>

<module name="TreeWalker">
<property name="cacheFile" value="${checkstyle.cache.file}"/>

Expand Down Expand Up @@ -52,6 +54,7 @@
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="100"/>
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
</module>
<!--<module name="MethodLength"/>-->
<!--module name="ParameterNumber"/-->
Expand Down Expand Up @@ -100,7 +103,6 @@
<!--module name="InnerAssignment"/-->
<!--module name="MagicNumber"/-->
<module name="MissingSwitchDefault"/>
<module name="RedundantThrows"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>

Expand All @@ -119,5 +121,7 @@
<!--module name="FinalParameters"/-->
<!--module name="TodoComment"/-->
<module name="UpperEll"/>
<module name="FileContentsHolder"/>
</module>

</module>
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_CODE=1
VERSION_NAME=0.3.6-SNAPSHOT
VERSION_NAME=1.0.0-alpha2
GROUP=com.airbnb
POM_DESCRIPTION=Observables lifecycle management
POM_URL=https://github.com/airbnb/rxgroups
Expand Down
42 changes: 42 additions & 0 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
def versions = [
supportLibVersion: '25.3.1',
mockito : '1.9.5',
testRunner : '0.5',
hamcrestVersion : '1.3'
]

ext.isCi = (project.hasProperty('CI') && CI == 'true')

ext.repositoryUrl = hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
ext.snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'

ext.androidConfig = [
compileSdkVersion: 25,
buildToolsVersion: '25.0.3',
minSdkVersion : 16,
targetSdkVersion : 25
]

ext.dep = [
androidSupportAppCompat: "com.android.support:appcompat-v7:$versions.supportLibVersion",
androidSupportDesign : "com.android.support:design:$versions.supportLibVersion",
androidPlugin : 'com.android.tools.build:gradle:2.3.0',
autoService : 'com.google.auto.service:auto-service:1.0-rc2',
findBugs : 'com.google.code.findbugs:jsr305:3.0.0',
gradleNexus : 'com.bmuschko:gradle-nexus-plugin:2.3.1',
javaPoet : 'com.squareup:javapoet:1.8.0',
rxAndroid : 'io.reactivex.rxjava2:rxandroid:2.0.1',
rxJava : 'io.reactivex.rxjava2:rxjava:2.1.0',

//Tests
junit : 'junit:junit:4.12',
mockito : 'org.mockito:mockito-core:1.10.19',
hamcrestIntegration : "org.hamcrest:hamcrest-integration:$versions.hamcrestVersion",
hamcrestCore : "org.hamcrest:hamcrest-core:$versions.hamcrestVersion",
hamcrestLibrary : "org.hamcrest:hamcrest-library:$versions.hamcrestVersion",
assertj : 'org.assertj:assertj-core:1.7.0',
roboelectric : 'org.robolectric:robolectric:3.1.2',
googleCompileTesting : 'com.google.testing.compile:compile-testing:0.11'
]

File renamed without changes.
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 Aug 27 18:56:48 PDT 2016
#Mon Apr 24 16:45:04 PDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
28 changes: 15 additions & 13 deletions rxgroups-android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
apply plugin: 'com.android.library'
apply from: 'gradle-maven-push.gradle'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion androidConfig.compileSdkVersion
buildToolsVersion androidConfig.buildToolsVersion

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
minSdkVersion androidConfig.minSdkVersion
targetSdkVersion androidConfig.targetSdkVersion
}
}

dependencies {
compile project(':rxgroups')
compile 'io.reactivex:rxandroid:1.2.1'
compile dep.rxAndroid

testCompile "junit:junit:4.12"
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile "org.hamcrest:hamcrest-integration:1.3"
testCompile "org.hamcrest:hamcrest-core:1.3"
testCompile "org.hamcrest:hamcrest-library:1.3"
testCompile 'org.assertj:assertj-core:1.7.0'
testCompile("org.robolectric:robolectric:3.1.2") {
testCompile project(':rxgroups-processor')
testCompile dep.junit
testCompile dep.mockito
testCompile dep.hamcrestIntegration
testCompile dep.hamcrestCore
testCompile dep.hamcrestLibrary
testCompile dep.assertj
testCompile(dep.roboelectric) {
exclude module: 'classworlds'
exclude module: 'commons-logging'
exclude module: 'httpclient'
Expand All @@ -39,3 +39,5 @@ dependencies {
exclude module: 'wagon-provider-api'
}
}

apply from: rootProject.file('gradle/gradle-maven-push.gradle')
126 changes: 0 additions & 126 deletions rxgroups-android/src/main/java/com/airbnb/rxgroups/ArrayUtils.java

This file was deleted.

Loading

0 comments on commit 697b9bc

Please sign in to comment.