├── docs ├── images │ └── uber_oss_logo.png ├── fonts │ └── UberMove-Medium.woff2 ├── css │ └── app.css ├── migrating-1x-2x.md ├── migrating-020-030.md └── migrating-040-050.md ├── android ├── autodispose-android │ ├── Module.md │ ├── autodispose-android.pro │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── autodispose2 │ │ │ │ └── android │ │ │ │ ├── package-info.java │ │ │ │ ├── internal │ │ │ │ ├── AutoDisposeAndroidUtil.java │ │ │ │ └── MainThreadDisposable.java │ │ │ │ ├── ViewScopeProvider.java │ │ │ │ └── DetachEventCompletable.java │ │ ├── androidTest │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── autodispose2 │ │ │ │ └── android │ │ │ │ └── AutoDisposeTestActivity.java │ │ └── test │ │ │ └── java │ │ │ └── autodispose2 │ │ │ └── android │ │ │ ├── internal │ │ │ └── MainThreadDisposableTest.java │ │ │ └── AutoDisposeAndroidPluginsTest.java │ ├── gradle.properties │ ├── build.gradle.kts │ └── api │ │ └── autodispose-android.api ├── autodispose-androidx-lifecycle-test │ ├── Module.md │ ├── consumer-proguard-rules.txt │ ├── api │ │ └── autodispose-androidx-lifecycle-test.api │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── autodispose2 │ │ │ └── androidx │ │ │ └── lifecycle │ │ │ └── test │ │ │ ├── package-info.java │ │ │ ├── KotlinExtensions.kt │ │ │ └── TestLifecycleOwner.java │ ├── gradle.properties │ └── build.gradle.kts └── autodispose-androidx-lifecycle │ ├── Module.md │ ├── consumer-proguard-rules.txt │ ├── src │ └── main │ │ └── java │ │ └── autodispose2 │ │ └── androidx │ │ └── lifecycle │ │ └── package-info.java │ ├── lint.xml │ ├── gradle.properties │ └── build.gradle.kts ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── sample ├── gradle.properties └── src │ └── main │ ├── res │ ├── raw │ │ └── sunset.jpg │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ ├── values │ │ ├── dimens.xml │ │ ├── styles.xml │ │ └── strings.xml │ └── layout │ │ ├── content_main.xml │ │ ├── activity_arch_component.xml │ │ ├── activity_main.xml │ │ └── activity_disposing_viewmodel.xml │ ├── java │ ├── autodispose2 │ │ ├── sample │ │ │ ├── CustomScope.java │ │ │ ├── package-info.java │ │ │ └── ClassWithCustomScope.java │ │ └── recipes │ │ │ ├── package-info.java │ │ │ └── AutoDisposeViewHolder.java │ └── androidx │ │ └── recyclerview │ │ └── widget │ │ └── BindAwareViewHolder.java │ ├── kotlin │ └── autodispose2 │ │ ├── sample │ │ ├── state │ │ │ └── DownloadState.kt │ │ ├── repository │ │ │ ├── NetworkRepository.kt │ │ │ └── ImageRepository.kt │ │ ├── ArchComponentViewModel.kt │ │ ├── HomeActivity.kt │ │ ├── ArchComponentActivity.kt │ │ └── DisposingViewModelActivity.kt │ │ └── recipes │ │ └── AutoDisposeViewHolderKotlin.kt │ └── AndroidManifest.xml ├── autodispose ├── src │ ├── main │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── proguard │ │ │ │ └── autodispose.pro │ │ └── java │ │ │ └── autodispose2 │ │ │ ├── observers │ │ │ ├── package-info.java │ │ │ ├── AutoDisposingObserver.java │ │ │ ├── AutoDisposingCompletableObserver.java │ │ │ ├── AutoDisposingMaybeObserver.java │ │ │ ├── AutoDisposingSingleObserver.java │ │ │ └── AutoDisposingSubscriber.java │ │ │ ├── AutoDisposeUtil.java │ │ │ ├── ParallelFlowableSubscribeProxy.java │ │ │ ├── OutsideScopeException.java │ │ │ ├── AutoDisposeCompletable.java │ │ │ ├── AutoDisposeFlowable.java │ │ │ ├── AutoDisposeMaybe.java │ │ │ ├── AutoDisposeSingle.java │ │ │ ├── AutoDisposeObservable.java │ │ │ ├── ScopeProvider.java │ │ │ ├── AutoDisposeConverter.java │ │ │ ├── package-info.java │ │ │ ├── Scopes.java │ │ │ ├── AtomicThrowable.java │ │ │ ├── AutoDisposableHelper.java │ │ │ ├── AutoDisposeParallelFlowable.java │ │ │ ├── AutoDisposeBackpressureHelper.java │ │ │ ├── TestScopeProvider.java │ │ │ ├── ExceptionHelper.java │ │ │ ├── CompletableSubscribeProxy.java │ │ │ ├── MaybeSubscribeProxy.java │ │ │ ├── ObservableSubscribeProxy.java │ │ │ ├── SingleSubscribeProxy.java │ │ │ └── FlowableSubscribeProxy.java │ └── test │ │ └── java │ │ └── autodispose2 │ │ ├── AClass.java │ │ ├── BClass.java │ │ ├── TestUtil.java │ │ ├── PluginsMatrixTest.java │ │ ├── AutoDisposePluginsTest.java │ │ └── TestScopeProviderTest.java ├── gradle.properties ├── Module.md └── build.gradle.kts ├── static-analysis ├── autodispose-lint │ ├── Module.md │ ├── src │ │ ├── test │ │ │ └── resources │ │ │ │ ├── rxjava-3.1.0.jar │ │ │ │ └── autodispose-2.0.0.jar │ │ └── main │ │ │ └── kotlin │ │ │ └── autodispose2 │ │ │ └── lint │ │ │ └── AutoDisposeIssueRegistry.kt │ ├── api │ │ └── autodispose-lint.api │ ├── gradle.properties │ └── build.gradle.kts └── autodispose-error-prone │ ├── src │ └── test │ │ ├── java │ │ └── autodispose2 │ │ │ └── errorprone │ │ │ └── ComponentWithLifecycle.java │ │ └── resources │ │ └── autodispose2 │ │ └── errorprone │ │ └── UseAutoDisposeCustomClassPositiveCases.java │ ├── gradle.properties │ └── build.gradle.kts ├── .github ├── dependabot.yml ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── ci.yml ├── autodispose-interop └── coroutines │ ├── Module.md │ ├── gradle.properties │ ├── build.gradle.kts │ └── api │ └── coroutines.api ├── RELEASING.md ├── spotless ├── copyright.java └── copyright.kt ├── autodispose-lifecycle ├── gradle.properties ├── build.gradle.kts ├── src │ ├── main │ │ └── java │ │ │ └── autodispose2 │ │ │ └── lifecycle │ │ │ ├── LifecycleEndedException.java │ │ │ ├── LifecycleNotStartedException.java │ │ │ ├── CorrespondingEventsFunction.java │ │ │ └── LifecycleScopeProvider.java │ └── test │ │ └── java │ │ └── autodispose2 │ │ └── lifecycle │ │ ├── TestUtil.java │ │ └── TestLifecycleScopeProviderTest.java ├── Module.md └── api │ └── autodispose-lifecycle.api ├── README.md ├── test-utils ├── build.gradle.kts └── src │ └── main │ └── java │ └── autodispose2 │ └── test │ └── RxErrorsRule.java ├── deploy_website.sh ├── settings.gradle.kts ├── .gitignore ├── mkdocs.yml ├── CONTRIBUTING.md ├── MAINTAINING_WEBSITE.md ├── gradle.properties └── gradlew.bat /docs/images/uber_oss_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/AutoDispose/HEAD/docs/images/uber_oss_logo.png -------------------------------------------------------------------------------- /android/autodispose-android/Module.md: -------------------------------------------------------------------------------- 1 | # Module autodispose-android 2 | 3 | Android components for AutoDispose. 4 | -------------------------------------------------------------------------------- /docs/fonts/UberMove-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/AutoDispose/HEAD/docs/fonts/UberMove-Medium.woff2 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/AutoDispose/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /sample/gradle.properties: -------------------------------------------------------------------------------- 1 | autodispose.typesWithScope=autodispose2.sample.CustomScope 2 | autodispose.lenient=false 3 | -------------------------------------------------------------------------------- /android/autodispose-androidx-lifecycle-test/Module.md: -------------------------------------------------------------------------------- 1 | # Module autodispose-androidx-lifecycle-test 2 | 3 | DEPRECATED 4 | -------------------------------------------------------------------------------- /sample/src/main/res/raw/sunset.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/AutoDispose/HEAD/sample/src/main/res/raw/sunset.jpg -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/AutoDispose/HEAD/sample/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/AutoDispose/HEAD/sample/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/AutoDispose/HEAD/sample/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/autodispose-androidx-lifecycle/Module.md: -------------------------------------------------------------------------------- 1 | # Module autodispose-androidx-lifecycle 2 | 3 | `androidx-lifecycle` extensions for AutoDispose. 4 | -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/AutoDispose/HEAD/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/AutoDispose/HEAD/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/autodispose-android/autodispose-android.pro: -------------------------------------------------------------------------------- 1 | # Top-level functions that can only be used by Kotlin. 2 | -dontwarn autodispose2.android.KotlinExtensions 3 | -------------------------------------------------------------------------------- /autodispose/src/main/resources/META-INF/proguard/autodispose.pro: -------------------------------------------------------------------------------- 1 | # Top-level functions that can only be used by Kotlin. 2 | -dontwarn autodispose2.KotlinExtensions 3 | -------------------------------------------------------------------------------- /static-analysis/autodispose-lint/Module.md: -------------------------------------------------------------------------------- 1 | # Module autodispose-lint 2 | 3 | Lint checks for AutoDispose. See full docs at https://uber.github.io/AutoDispose/lint-check/ 4 | -------------------------------------------------------------------------------- /static-analysis/autodispose-lint/src/test/resources/rxjava-3.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/AutoDispose/HEAD/static-analysis/autodispose-lint/src/test/resources/rxjava-3.1.0.jar -------------------------------------------------------------------------------- /android/autodispose-androidx-lifecycle-test/consumer-proguard-rules.txt: -------------------------------------------------------------------------------- 1 | # Top-level functions that can only be used by Kotlin. 2 | -dontwarn autodispose2.android.lifecycle.test.KotlinExtensions 3 | -------------------------------------------------------------------------------- /static-analysis/autodispose-lint/src/test/resources/autodispose-2.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/AutoDispose/HEAD/static-analysis/autodispose-lint/src/test/resources/autodispose-2.0.0.jar -------------------------------------------------------------------------------- /android/autodispose-androidx-lifecycle/consumer-proguard-rules.txt: -------------------------------------------------------------------------------- 1 | -keep class * implements androidx.lifecycle.GeneratedAdapter {(...);} 2 | 3 | # Top-level functions that can only be used by Kotlin. 4 | -dontwarn autodispose2.androidx.lifecycle.KotlinExtensions 5 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Please see the documentation for all configuration options: 2 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 3 | 4 | version: 2 5 | updates: 6 | - package-ecosystem: "gradle" 7 | directory: "/" 8 | schedule: 9 | interval: "daily" 10 | -------------------------------------------------------------------------------- /autodispose-interop/coroutines/Module.md: -------------------------------------------------------------------------------- 1 | # Module autodispose-interop-coroutines 2 | 3 | Extension functions to interop `ScopeProvider`/`Completable` and `CoroutineScope`, as well as 4 | `autoDispose(CoroutineScope)` extension functions on RxJava types. 5 | 6 | # Package autodispose2.interop.coroutines 7 | 8 | Extension functions to interop `ScopeProvider`/`Completable` and `CoroutineScope`, as well as 9 | `autoDispose(CoroutineScope)` extension functions on RxJava types. 10 | -------------------------------------------------------------------------------- /RELEASING.md: -------------------------------------------------------------------------------- 1 | Releasing 2 | ========= 3 | 4 | 1. Change the version in `gradle.properties` to a non-SNAPSHOT version. 5 | 2. Update the `CHANGELOG.md` for the impending release. 6 | 3. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version) 7 | 4. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version) 8 | 5. `./gradlew publish` 9 | 6. Update the `gradle.properties` to the next SNAPSHOT version. 10 | 7. `git commit -am "Prepare next development version."` 11 | 8. `git push && git push --tags` 12 | 9. Deploy the updated website with the new docs. This can be done by running the script `./deploy_website.sh` 13 | -------------------------------------------------------------------------------- /docs/css/app.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: uber-move; 3 | src: url("../fonts/UberMove-Medium.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal 6 | } 7 | 8 | @font-face { 9 | font-family: uber-move; 10 | src: url("../fonts/UberMove-Medium.woff2") format("woff2"); 11 | font-weight: 500; 12 | font-style: normal 13 | } 14 | 15 | @font-face { 16 | font-family: uber-move; 17 | src: url("../fonts/UberMove-Medium.woff2") format("woff2"); 18 | font-weight: 700; 19 | font-style: normal 20 | } 21 | 22 | body, input { 23 | font-family: uber-move,"Helvetica Neue",helvetica,sans-serif; 24 | } 25 | -------------------------------------------------------------------------------- /spotless/copyright.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) $YEAR. Uber Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | -------------------------------------------------------------------------------- /spotless/copyright.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) $YEAR. Uber Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | **Library version**: 9 | 10 | 11 | **Repro steps or stacktrace**: 12 | -------------------------------------------------------------------------------- /autodispose/src/test/java/autodispose2/AClass.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019. Uber Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package autodispose2; 17 | 18 | public class AClass {} 19 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | **Description**: 9 | 10 | 11 | **Related issue(s)**: 12 | 13 | 14 | -------------------------------------------------------------------------------- /autodispose/src/test/java/autodispose2/BClass.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019. Uber Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package autodispose2; 17 | 18 | public final class BClass extends AClass {} 19 | -------------------------------------------------------------------------------- /sample/src/main/java/autodispose2/sample/CustomScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019. Uber Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package autodispose2.sample; 17 | 18 | public interface CustomScope {} 19 | -------------------------------------------------------------------------------- /autodispose/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017. Uber Technologies 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | POM_NAME=AutoDispose 18 | POM_ARTIFACT_ID=autodispose 19 | POM_PACKAGING=jar 20 | AUTOMATIC_MODULE_NAME=autodispose2 21 | -------------------------------------------------------------------------------- /sample/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 16dp 19 | 20 | -------------------------------------------------------------------------------- /sample/src/main/java/autodispose2/recipes/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Uber Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** Android recipes for AutoDispose. */ 18 | package autodispose2.recipes; 19 | -------------------------------------------------------------------------------- /android/autodispose-android/src/main/java/autodispose2/android/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Uber Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** Android components for AutoDispose. */ 18 | package autodispose2.android; 19 | -------------------------------------------------------------------------------- /autodispose-lifecycle/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2018. Uber Technologies 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | POM_NAME=AutoDispose (Lifecycle) 18 | POM_ARTIFACT_ID=autodispose-lifecycle 19 | POM_PACKAGING=jar 20 | AUTOMATIC_MODULE_NAME=autodispose2.lifecycle 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AutoDispose 2 | 3 | Automatic binding+disposal of RxJava streams. 4 | 5 | ### [uber.github.io/AutoDispose](https://uber.github.io/AutoDispose) 6 | 7 | License 8 | ------- 9 | 10 | Copyright (C) 2017 Uber Technologies 11 | 12 | Licensed under the Apache License, Version 2.0 (the "License"); 13 | you may not use this file except in compliance with the License. 14 | You may obtain a copy of the License at 15 | 16 | https://www.apache.org/licenses/LICENSE-2.0 17 | 18 | Unless required by applicable law or agreed to in writing, software 19 | distributed under the License is distributed on an "AS IS" BASIS, 20 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | See the License for the specific language governing permissions and 22 | limitations under the License. 23 | -------------------------------------------------------------------------------- /android/autodispose-androidx-lifecycle-test/api/autodispose-androidx-lifecycle-test.api: -------------------------------------------------------------------------------- 1 | public final class autodispose2/androidx/lifecycle/test/KotlinExtensionsKt { 2 | public static final fun test (Landroidx/lifecycle/LifecycleRegistry;)Lautodispose2/androidx/lifecycle/test/TestLifecycleOwner; 3 | } 4 | 5 | public final class autodispose2/androidx/lifecycle/test/TestLifecycleOwner : androidx/lifecycle/LifecycleOwner { 6 | public static fun create ()Lautodispose2/androidx/lifecycle/test/TestLifecycleOwner; 7 | public static fun create (Landroidx/lifecycle/LifecycleRegistry;)Lautodispose2/androidx/lifecycle/test/TestLifecycleOwner; 8 | public fun emit (Landroidx/lifecycle/Lifecycle$Event;)V 9 | public synthetic fun getLifecycle ()Landroidx/lifecycle/Lifecycle; 10 | public fun getLifecycle ()Landroidx/lifecycle/LifecycleRegistry; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /test-utils/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017. Uber Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | plugins { alias(libs.plugins.kotlin.jvm) } 17 | 18 | dependencies { 19 | api(libs.rx.java) 20 | api(libs.test.junit) 21 | api(libs.test.truth) 22 | } 23 | -------------------------------------------------------------------------------- /android/autodispose-android/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017. Uber Technologies 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | POM_NAME=AutoDispose (Android Extensions) 18 | POM_ARTIFACT_ID=autodispose-android 19 | POM_PACKAGING=aar 20 | AUTOMATIC_MODULE_NAME=autodispose2.android 21 | -------------------------------------------------------------------------------- /static-analysis/autodispose-error-prone/src/test/java/autodispose2/errorprone/ComponentWithLifecycle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019. Uber Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package autodispose2.errorprone; 17 | 18 | public class ComponentWithLifecycle {} 19 | -------------------------------------------------------------------------------- /sample/src/main/java/autodispose2/sample/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Uber Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Android recipes for AutoDispose. 19 | * 20 | *

Sample app for AutoDispose. 21 | */ 22 | package autodispose2.sample; 23 | -------------------------------------------------------------------------------- /static-analysis/autodispose-error-prone/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017. Uber Technologies 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | POM_NAME=AutoDispose Error-Prone Checker 18 | POM_ARTIFACT_ID=autodispose-error-prone 19 | POM_PACKAGING=jar 20 | AUTOMATIC_MODULE_NAME=autodispose2.errorprone 21 | -------------------------------------------------------------------------------- /android/autodispose-androidx-lifecycle/src/main/java/autodispose2/androidx/lifecycle/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Uber Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** {@code androidx-lifecycle} extensions for AutoDispose. */ 18 | package autodispose2.androidx.lifecycle; 19 | -------------------------------------------------------------------------------- /autodispose-interop/coroutines/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019. Uber Technologies 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | POM_NAME=AutoDispose (Coroutines Interop) 18 | POM_ARTIFACT_ID=autodispose-interop-coroutines 19 | POM_PACKAGING=jar 20 | AUTOMATIC_MODULE_NAME=autodispose2.interop.coroutines 21 | -------------------------------------------------------------------------------- /android/autodispose-androidx-lifecycle/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /static-analysis/autodispose-lint/api/autodispose-lint.api: -------------------------------------------------------------------------------- 1 | public final class autodispose2/lint/AutoDisposeDetector : com/android/tools/lint/detector/api/Detector, com/android/tools/lint/detector/api/SourceCodeScanner { 2 | public fun ()V 3 | public fun beforeCheckRootProject (Lcom/android/tools/lint/detector/api/Context;)V 4 | public fun createUastHandler (Lcom/android/tools/lint/detector/api/JavaContext;)Lcom/android/tools/lint/client/api/UElementHandler; 5 | public fun getApplicableMethodNames ()Ljava/util/List; 6 | public fun getApplicableUastTypes ()Ljava/util/List; 7 | } 8 | 9 | public final class autodispose2/lint/AutoDisposeIssueRegistry : com/android/tools/lint/client/api/IssueRegistry { 10 | public fun ()V 11 | public fun getApi ()I 12 | public fun getIssues ()Ljava/util/List; 13 | public fun getVendor ()Lcom/android/tools/lint/client/api/Vendor; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /android/autodispose-androidx-lifecycle/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2017. Uber Technologies 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | POM_NAME=AutoDispose (androidx-lifecycle extensions) 18 | POM_ARTIFACT_ID=autodispose-androidx-lifecycle 19 | POM_PACKAGING=aar 20 | AUTOMATIC_MODULE_NAME=autodispose2.androidx.lifecycle 21 | -------------------------------------------------------------------------------- /android/autodispose-androidx-lifecycle-test/src/main/java/autodispose2/androidx/lifecycle/test/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019. Uber Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** Test extensions for {@link autodispose2.androidx.lifecycle}. */ 18 | package autodispose2.androidx.lifecycle.test; 19 | -------------------------------------------------------------------------------- /android/autodispose-androidx-lifecycle-test/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2017. Uber Technologies 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | POM_NAME=AutoDispose (androidx-lifecycle test extensions) 18 | POM_ARTIFACT_ID=autodispose-androidx-lifecycle-test 19 | POM_PACKAGING=aar 20 | AUTOMATIC_MODULE_NAME=autodispose2.androidx.lifecycle.test 21 | -------------------------------------------------------------------------------- /sample/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 |