├── arouter-ktx ├── .gitignore ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── dylanc │ │ │ └── arouter │ │ │ ├── IRoutePaths.kt │ │ │ ├── ARouterInitializer.kt │ │ │ ├── SignInInterceptor.kt │ │ │ ├── PathsInitializer.kt │ │ │ ├── RequireSignInContract.kt │ │ │ ├── ARouter.kt │ │ │ └── Postcard.kt │ │ └── AndroidManifest.xml ├── consumer-rules.pro ├── proguard-rules.pro └── build.gradle ├── module-base ├── .gitignore ├── consumer-rules.pro ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── dylanc │ │ └── arouter │ │ └── sample │ │ └── base │ │ ├── bean │ │ └── ApiResponse.kt │ │ └── constants │ │ └── Constants.kt ├── proguard-rules.pro └── build.gradle ├── sample-app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── drawable │ │ │ │ ├── ic_baseline_account_circle_24.xml │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── layout │ │ │ │ ├── activity_splash.xml │ │ │ │ └── activity_main.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── dylanc │ │ │ │ └── arouter │ │ │ │ └── sample │ │ │ │ ├── constant │ │ │ │ └── Constants.kt │ │ │ │ ├── App.kt │ │ │ │ └── ui │ │ │ │ ├── SplashActivity.kt │ │ │ │ └── MainActivity.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── dylanc │ │ │ └── arouter │ │ │ └── sample │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── dylanc │ │ └── arouter │ │ └── sample │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── module-payment-api ├── .gitignore ├── consumer-rules.pro ├── src │ ├── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── dylanc │ │ │ └── arouter │ │ │ └── sample │ │ │ └── payment │ │ │ └── service │ │ │ ├── Paths.kt │ │ │ └── PaymentService.kt │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── dylanc │ │ │ └── arouter │ │ │ └── sample │ │ │ └── payment │ │ │ └── service │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── dylanc │ │ └── arouter │ │ └── sample │ │ └── payment │ │ └── service │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── module-payment-impl ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── themes.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── layout │ │ │ │ └── activity_pay.xml │ │ │ └── drawable │ │ │ │ └── ic_launcher_background.xml │ │ ├── manifest │ │ │ └── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── dylanc │ │ │ │ └── arouter │ │ │ │ └── sample │ │ │ │ └── payment │ │ │ │ ├── provider │ │ │ │ └── PaymentServiceProvider.kt │ │ │ │ └── ui │ │ │ │ └── PayActivity.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── dylanc │ │ │ └── arouter │ │ │ └── sample │ │ │ └── payment │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── dylanc │ │ └── arouter │ │ └── sample │ │ └── payment │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── module-user-api ├── .gitignore ├── consumer-rules.pro ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── dylanc │ │ └── arouter │ │ └── sample │ │ └── user │ │ └── service │ │ ├── bean │ │ └── User.kt │ │ ├── Paths.kt │ │ └── UserService.kt ├── proguard-rules.pro └── build.gradle ├── module-user-impl ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_user_info.xml │ │ │ │ └── activity_login.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── drawable │ │ │ │ └── ic_launcher_background.xml │ │ ├── manifest │ │ │ └── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── dylanc │ │ │ │ └── arouter │ │ │ │ └── sample │ │ │ │ └── user │ │ │ │ ├── ui │ │ │ │ ├── login │ │ │ │ │ ├── LoginViewModel.kt │ │ │ │ │ └── LoginActivity.kt │ │ │ │ ├── TestActivity.kt │ │ │ │ └── userinfo │ │ │ │ │ └── UserInfoActivity.kt │ │ │ │ ├── api │ │ │ │ └── UserApi.kt │ │ │ │ ├── App.kt │ │ │ │ ├── repository │ │ │ │ └── UserRepository.kt │ │ │ │ └── provider │ │ │ │ └── UserServiceProvider.kt │ │ └── AndroidManifest.xml │ └── userUI2 │ │ └── res │ │ └── layout │ │ └── activity_login.xml ├── proguard-rules.pro └── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── arouter-annotations ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── dylanc │ └── arouter │ └── annotations │ ├── RequireSignIn.kt │ ├── SignInActivity.kt │ ├── LoginActivityPath.kt │ └── RequireLoginPath.kt ├── .gitignore ├── settings.gradle ├── arouter-compiler ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── dylanc │ │ │ └── arouter │ │ │ └── compiler │ │ │ ├── Constants.kt │ │ │ ├── LoginInfoProcessor.kt │ │ │ └── PathsProcessor.kt │ │ └── resources │ │ └── META-INF │ │ └── services │ │ └── javax.annotation.processing.Processor └── build.gradle ├── gradle.properties ├── gradlew.bat └── gradlew /arouter-ktx/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /module-base/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /module-base/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sample-app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /module-payment-api/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /module-payment-api/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /module-payment-impl/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /module-user-api/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /module-user-api/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /module-user-impl/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /module-base/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | SamplePayment 3 | -------------------------------------------------------------------------------- /module-user-impl/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Sample-Login 3 | 4 | -------------------------------------------------------------------------------- /sample-app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/sample-app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample-app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/sample-app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample-app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/sample-app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample-app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/sample-app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /module-user-api/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /sample-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/sample-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /module-user-impl/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-user-impl/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /module-user-impl/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-user-impl/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /module-user-impl/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-user-impl/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample-app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/sample-app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample-app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/sample-app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample-app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/sample-app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-payment-impl/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-payment-impl/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-payment-impl/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /module-user-impl/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-user-impl/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /module-user-impl/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-user-impl/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/sample-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/sample-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-payment-impl/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-payment-impl/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /module-user-impl/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-user-impl/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /module-user-impl/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-user-impl/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-payment-impl/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-payment-impl/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /module-user-impl/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-user-impl/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /module-user-impl/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-user-impl/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /module-user-impl/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-user-impl/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-payment-impl/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-payment-impl/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DylanCaiCoding/ARouterKTX/HEAD/module-payment-impl/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample-app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ARouterKTX 3 | Login 4 | Logout 5 | 6 | -------------------------------------------------------------------------------- /arouter-ktx/src/main/java/com/dylanc/arouter/IRoutePaths.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter 2 | 3 | /** 4 | * @author Dylan Cai 5 | */ 6 | interface IRoutePaths { 7 | 8 | fun loadInto(list: ArrayList) 9 | } -------------------------------------------------------------------------------- /arouter-annotations/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java-library' 3 | id 'kotlin' 4 | } 5 | 6 | java { 7 | sourceCompatibility = JavaVersion.VERSION_1_7 8 | targetCompatibility = JavaVersion.VERSION_1_7 9 | } -------------------------------------------------------------------------------- /module-payment-api/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /sample-app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #6200EE 4 | #3700B3 5 | #03DAC5 6 | 7 | -------------------------------------------------------------------------------- /module-user-impl/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #6200EE 4 | #3700B3 5 | #03DAC5 6 | 7 | -------------------------------------------------------------------------------- /module-payment-api/src/main/java/com/dylanc/arouter/sample/payment/service/Paths.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.payment.service 2 | 3 | /** 4 | * @author Dylan Cai 5 | */ 6 | 7 | const val GROUP_PAYMENT = "/payment" 8 | const val PATH_PAYMENT = "$GROUP_PAYMENT/payment" -------------------------------------------------------------------------------- /arouter-annotations/src/main/java/com/dylanc/arouter/annotations/RequireSignIn.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.annotations 2 | 3 | /** 4 | * @author Dylan Cai 5 | */ 6 | @Retention(AnnotationRetention.SOURCE) 7 | @Target(AnnotationTarget.CLASS) 8 | annotation class RequireSignIn 9 | -------------------------------------------------------------------------------- /arouter-annotations/src/main/java/com/dylanc/arouter/annotations/SignInActivity.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.annotations 2 | 3 | /** 4 | * @author Dylan Cai 5 | */ 6 | @Retention(AnnotationRetention.SOURCE) 7 | @Target(AnnotationTarget.CLASS) 8 | annotation class SignInActivity 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | -------------------------------------------------------------------------------- /arouter-annotations/src/main/java/com/dylanc/arouter/annotations/LoginActivityPath.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.annotations 2 | 3 | /** 4 | * @author Dylan Cai 5 | */ 6 | @Retention(AnnotationRetention.SOURCE) 7 | @Target(AnnotationTarget.FIELD) 8 | annotation class LoginActivityPath 9 | -------------------------------------------------------------------------------- /arouter-annotations/src/main/java/com/dylanc/arouter/annotations/RequireLoginPath.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.annotations 2 | 3 | /** 4 | * @author Dylan Cai 5 | */ 6 | @Retention(AnnotationRetention.SOURCE) 7 | @Target(AnnotationTarget.FIELD) 8 | annotation class RequireLoginPath 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat May 23 00:05:36 CST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip 7 | -------------------------------------------------------------------------------- /module-base/src/main/java/com/dylanc/arouter/sample/base/bean/ApiResponse.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.base.bean 2 | 3 | /** 4 | * @author Dylan Cai 5 | * @since 2020/5/24 6 | */ 7 | data class ApiResponse( 8 | val code: Int, 9 | val msg: String, 10 | val data: T 11 | ) -------------------------------------------------------------------------------- /module-base/src/main/java/com/dylanc/arouter/sample/base/constants/Constants.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.base.constants 2 | 3 | 4 | /** 5 | * @author Dylan Cai 6 | */ 7 | 8 | //const val GROUP_APP = "/app" 9 | // 10 | //@RequireLoginPath 11 | //const val PATH_MAIN = "$GROUP_APP/main" -------------------------------------------------------------------------------- /module-payment-impl/src/main/manifest/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sample-app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name='ARouterKTX' 2 | include ':sample-app' 3 | include ':arouter-ktx' 4 | include ':module-user-api' 5 | include ':module-base' 6 | include ':module-user-impl' 7 | include ':module-payment-impl' 8 | include ':module-payment-api' 9 | include ':arouter-annotations' 10 | include ':arouter-compiler' 11 | -------------------------------------------------------------------------------- /module-user-impl/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /sample-app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /module-user-impl/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /module-payment-api/src/main/java/com/dylanc/arouter/sample/payment/service/PaymentService.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.payment.service 2 | 3 | import com.alibaba.android.arouter.facade.template.IProvider 4 | 5 | /** 6 | * @author Dylan Cai 7 | */ 8 | interface PaymentService : IProvider { 9 | fun aliPay(money: Float) 10 | 11 | fun wechatPay(money: Float) 12 | } -------------------------------------------------------------------------------- /module-user-api/src/main/java/com/dylanc/arouter/sample/user/service/bean/User.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.user.service.bean 2 | 3 | import android.os.Parcelable 4 | import kotlinx.parcelize.Parcelize 5 | 6 | /** 7 | * @author Dylan Cai 8 | * @since 2020/5/24 9 | */ 10 | @Parcelize 11 | data class User( 12 | val id: String, 13 | val name: String 14 | ) : Parcelable -------------------------------------------------------------------------------- /module-user-impl/src/main/manifest/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /arouter-ktx/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class com.dylanc.arouter.*{*;} 2 | 3 | -keep public class com.alibaba.android.arouter.routes.**{*;} 4 | -keep public class com.alibaba.android.arouter.facade.**{*;} 5 | -keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;} 6 | # 如果使用了 byType 的方式获取 Service,需添加下面规则,保护接口 7 | -keep interface * implements com.alibaba.android.arouter.facade.template.IProvider -------------------------------------------------------------------------------- /arouter-compiler/src/main/java/com/dylanc/arouter/compiler/Constants.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.compiler 2 | 3 | /** 4 | * @author Dylan Cai 5 | */ 6 | const val PACKAGE_NAME = "com.alibaba.android.arouter.routes" 7 | 8 | const val PROJECT = "ARouter" 9 | 10 | const val SEPARATOR = "$$" 11 | 12 | const val KEY_MODULE_NAME = "AROUTER_MODULE_NAME" 13 | 14 | const val IROUTE_PATHS = "com.dylanc.arouter.IRoutePaths" -------------------------------------------------------------------------------- /arouter-compiler/src/main/resources/META-INF/services/javax.annotation.processing.Processor: -------------------------------------------------------------------------------- 1 | com.dylanc.arouter.compiler.PathsProcessor 2 | com.dylanc.arouter.compiler.LoginInfoProcessor 3 | com.alibaba.android.arouter.compiler.processor.RouteProcessor,aggregating 4 | com.alibaba.android.arouter.compiler.processor.AutowiredProcessor,aggregating 5 | com.alibaba.android.arouter.compiler.processor.InterceptorProcessor,aggregating 6 | -------------------------------------------------------------------------------- /module-user-api/src/main/java/com/dylanc/arouter/sample/user/service/Paths.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.user.service 2 | 3 | import com.dylanc.arouter.annotations.RequireLoginPath 4 | import com.dylanc.arouter.annotations.LoginActivityPath 5 | 6 | const val GROUP_USER = "/user" 7 | 8 | @LoginActivityPath 9 | const val PATH_LOGIN = "$GROUP_USER/login" 10 | 11 | @RequireLoginPath 12 | const val PATH_USER_INFO = "$GROUP_USER/userinfo" -------------------------------------------------------------------------------- /sample-app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /module-user-impl/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sample-app/src/main/java/com/dylanc/arouter/sample/constant/Constants.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.constant 2 | 3 | import com.dylanc.arouter.annotations.RequireLoginPath 4 | import com.dylanc.retrofit.annotations.BaseUrl 5 | 6 | /** 7 | * @author Dylan Cai 8 | * @since 2020/5/24 9 | */ 10 | @BaseUrl 11 | const val BASE_URL = "https://fastmock.site/" 12 | 13 | const val GROUP_APP = "/app" 14 | 15 | const val PATH_MAIN = "$GROUP_APP/main" -------------------------------------------------------------------------------- /arouter-compiler/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java-library' 3 | id 'kotlin' 4 | } 5 | 6 | dependencies { 7 | implementation "com.squareup:javapoet:1.13.0" 8 | implementation 'com.alibaba:arouter-compiler:1.5.2' 9 | api 'com.alibaba:arouter-annotation:1.0.6' 10 | api project(path: ':arouter-annotations') 11 | } 12 | 13 | java { 14 | sourceCompatibility = JavaVersion.VERSION_1_7 15 | targetCompatibility = JavaVersion.VERSION_1_7 16 | } 17 | -------------------------------------------------------------------------------- /sample-app/src/test/java/com/dylanc/arouter/sample/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /module-payment-impl/src/test/java/com/dylanc/arouter/sample/payment/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.payment 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /module-payment-api/src/test/java/com/dylanc/arouter/sample/payment/service/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.payment.service 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /sample-app/src/main/java/com/dylanc/arouter/sample/App.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample 2 | 3 | import android.app.Application 4 | import com.dylanc.arouter.SignInInterceptor 5 | import com.dylanc.arouter.routerServices 6 | import com.dylanc.arouter.sample.user.service.UserService 7 | 8 | /** 9 | * @author Dylan Cai 10 | */ 11 | @Suppress("unused") 12 | class App : Application() { 13 | 14 | private val userService: UserService? by routerServices() 15 | 16 | override fun onCreate() { 17 | super.onCreate() 18 | SignInInterceptor.enable { userService?.isLogin() == true } 19 | } 20 | } -------------------------------------------------------------------------------- /module-user-api/src/main/java/com/dylanc/arouter/sample/user/service/UserService.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.user.service 2 | 3 | import android.app.Activity 4 | import com.alibaba.android.arouter.facade.template.IProvider 5 | import com.dylanc.arouter.sample.user.service.bean.User 6 | import kotlinx.coroutines.flow.Flow 7 | 8 | /** 9 | * @author Dylan Cai 10 | * @since 2020/5/24 11 | */ 12 | interface UserService : IProvider { 13 | fun login(username: String, password: String): Flow 14 | 15 | fun logout(activity: Activity) 16 | 17 | fun isLogin(): Boolean 18 | 19 | val username: String? 20 | } -------------------------------------------------------------------------------- /sample-app/src/main/res/drawable/ic_baseline_account_circle_24.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /module-user-impl/src/main/java/com/dylanc/arouter/sample/user/ui/login/LoginViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.user.ui.login 2 | 3 | import androidx.lifecycle.asLiveData 4 | import com.dylanc.arouter.sample.user.repository.UserRepository 5 | import com.dylanc.retrofit.coroutines.RequestViewModel 6 | import com.dylanc.retrofit.coroutines.catchWith 7 | import com.dylanc.retrofit.coroutines.showLoadingWith 8 | 9 | /** 10 | * @author Dylan Cai 11 | */ 12 | class LoginViewModel : RequestViewModel() { 13 | 14 | fun login(username: String, password: String) = 15 | UserRepository.login(username, password) 16 | .showLoadingWith(loadingFlow) 17 | .catchWith(exceptionFlow) 18 | .asLiveData() 19 | } -------------------------------------------------------------------------------- /module-user-impl/src/main/java/com/dylanc/arouter/sample/user/api/UserApi.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.user.api 2 | 3 | import com.dylanc.arouter.sample.base.bean.ApiResponse 4 | import com.dylanc.arouter.sample.user.service.bean.User 5 | import retrofit2.http.Field 6 | import retrofit2.http.FormUrlEncoded 7 | import retrofit2.http.POST 8 | 9 | /** 10 | * @author Dylan Cai 11 | * @since 2020/5/24 12 | */ 13 | private const val USER = "mock/fcd983f6975dc5cfcb8b28b0f12b645f/component/user" 14 | 15 | interface UserApi { 16 | 17 | @FormUrlEncoded 18 | @POST("$USER/login") 19 | suspend fun login( 20 | @Field("username") username: String, 21 | @Field("password") password: String 22 | ): ApiResponse 23 | } -------------------------------------------------------------------------------- /module-user-impl/src/main/java/com/dylanc/arouter/sample/user/App.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.user 2 | 3 | import android.app.Application 4 | import com.dylanc.arouter.SignInInterceptor 5 | import com.dylanc.arouter.routerServices 6 | import com.dylanc.arouter.sample.user.service.UserService 7 | import com.dylanc.retrofit.initRetrofit 8 | 9 | /** 10 | * @author Dylan Cai 11 | */ 12 | @Suppress("unused") 13 | class App : Application() { 14 | 15 | private val userService: UserService? by routerServices() 16 | 17 | override fun onCreate() { 18 | super.onCreate() 19 | SignInInterceptor.enable { userService?.isLogin() == true } 20 | 21 | initRetrofit { 22 | baseUrl("https://fastmock.site/") 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /arouter-ktx/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 12 | 15 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /module-user-impl/src/main/java/com/dylanc/arouter/sample/user/ui/TestActivity.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.user.ui 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | import com.dylanc.arouter.sample.user.service.PATH_USER_INFO 6 | import com.dylanc.arouter.sample.user.databinding.ActivityMainBinding 7 | import com.dylanc.arouter.startActivityByRouter 8 | import com.dylanc.viewbinding.binding 9 | 10 | class TestActivity : AppCompatActivity() { 11 | 12 | private val binding: ActivityMainBinding by binding() 13 | 14 | override fun onCreate(savedInstanceState: Bundle?) { 15 | super.onCreate(savedInstanceState) 16 | binding.btnUserInfo.setOnClickListener { 17 | startActivityByRouter(PATH_USER_INFO) 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /sample-app/src/main/java/com/dylanc/arouter/sample/ui/SplashActivity.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.ui 2 | 3 | import android.os.Bundle 4 | import android.os.Handler 5 | import android.os.Looper 6 | import androidx.appcompat.app.AppCompatActivity 7 | import com.dylanc.arouter.sample.R 8 | import com.dylanc.arouter.sample.constant.PATH_MAIN 9 | import com.dylanc.arouter.startActivityByRouter 10 | 11 | class SplashActivity : AppCompatActivity() { 12 | 13 | override fun onCreate(savedInstanceState: Bundle?) { 14 | super.onCreate(savedInstanceState) 15 | setContentView(R.layout.activity_splash) 16 | Handler(Looper.getMainLooper()).postDelayed({ 17 | startActivityByRouter(PATH_MAIN) { 18 | onArrival { finish() } 19 | } 20 | }, 1000) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /module-payment-impl/src/main/java/com/dylanc/arouter/sample/payment/provider/PaymentServiceProvider.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.payment.provider 2 | 3 | import android.content.Context 4 | import com.alibaba.android.arouter.facade.annotation.Route 5 | import com.dylanc.arouter.sample.payment.service.PaymentService 6 | import com.dylanc.longan.toast 7 | import com.dylanc.longan.topActivity 8 | 9 | /** 10 | * @author Dylan Cai 11 | */ 12 | @Route(path = "/payment/service") 13 | class PaymentServiceProvider : PaymentService { 14 | 15 | override fun aliPay(money: Float) { 16 | topActivity.toast("Ali Pay ¥$money") 17 | } 18 | 19 | override fun wechatPay(money: Float) { 20 | topActivity.toast("Wechat Pay ¥$money") 21 | } 22 | 23 | override fun init(context: Context) { 24 | 25 | } 26 | } -------------------------------------------------------------------------------- /sample-app/src/androidTest/java/com/dylanc/arouter/sample/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.dylanc.arouter.ktx.sample", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /module-payment-impl/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /sample-app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /arouter-ktx/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /module-base/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /module-payment-api/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /module-payment-impl/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /module-payment-impl/src/androidTest/java/com/dylanc/arouter/sample/payment/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.payment 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.dylanc.arouter.sample.payment", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /module-user-api/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /module-user-impl/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | 23 | -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /module-payment-impl/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /module-payment-api/src/androidTest/java/com/dylanc/arouter/sample/payment/service/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.dylanc.arouter.sample.payment.service 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.dylanc.arouter.sample.payment.service.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /module-user-impl/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |