├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── themes.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── xml │ │ │ │ ├── backup_rules.xml │ │ │ │ └── data_extraction_rules.xml │ │ │ ├── layout │ │ │ │ └── activity_main.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── drawable │ │ │ │ └── ic_launcher_background.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── geelee │ │ │ │ └── startup │ │ │ │ └── demo │ │ │ │ ├── MainActivity.kt │ │ │ │ ├── MyApplication.kt │ │ │ │ ├── BaseLogInitializer.kt │ │ │ │ └── Initializers.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── geelee │ │ │ └── startup │ │ │ └── demo │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── geelee │ │ └── startup │ │ └── demo │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── startup ├── .gitignore ├── consumer-rules.pro ├── src │ ├── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── geelee │ │ │ └── startup │ │ │ ├── Initializer.kt │ │ │ ├── IStartupLogger.kt │ │ │ ├── ktx │ │ │ ├── ComponentInfo.kt │ │ │ └── Context.kt │ │ │ └── Startup.kt │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── geelee │ │ │ └── startup │ │ │ └── ExampleInstrumentedTest.kt │ └── test │ │ └── java │ │ └── com │ │ └── geelee │ │ └── startup │ │ ├── StartupTest.kt │ │ └── DependencyChainBuilderTest.kt ├── proguard-rules.pro └── build.gradle ├── startup-annotation ├── .gitignore ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── geelee │ └── startup │ └── annotation │ ├── Config.kt │ ├── IInitializerRegistry.kt │ └── model │ ├── DependencyChain.kt │ └── ComponentInfo.kt ├── startup-processor ├── .gitignore ├── src │ └── main │ │ └── java │ │ └── com │ │ └── geelee │ │ └── startup │ │ └── processor │ │ ├── ktx │ │ ├── Iterable.kt │ │ ├── ComponentInfo.kt │ │ └── Literal.kt │ │ ├── ILogger.kt │ │ ├── exception │ │ ├── IllegalAnnotationException.kt │ │ ├── CycleDependencyException.kt │ │ ├── IllegalThreadException.kt │ │ └── IllegalProcessException.kt │ │ ├── InitializerReporter.kt │ │ ├── DependencyChainBuilder.kt │ │ └── InitializerProcessor.kt └── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle ├── gradle.properties ├── README-CN.md ├── gradlew.bat ├── README.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /startup/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /startup/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /startup-annotation/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /startup-processor/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Startup 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeJoe/Startup/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeJoe/Startup/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeJoe/Startup/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeJoe/Startup/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeJoe/Startup/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeJoe/Startup/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeJoe/Startup/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeJoe/Startup/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeJoe/Startup/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeJoe/Startup/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeJoe/Startup/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | .cxx 10 | local.properties 11 | -------------------------------------------------------------------------------- /startup/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FF000000 4 | #FFFFFFFF 5 | -------------------------------------------------------------------------------- /startup/src/main/java/com/geelee/startup/Initializer.kt: -------------------------------------------------------------------------------- 1 | package com.geelee.startup 2 | 3 | import android.content.Context 4 | 5 | interface Initializer { 6 | fun init(context: Context, processName: String) 7 | } -------------------------------------------------------------------------------- /startup-annotation/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java-library' 3 | id 'org.jetbrains.kotlin.jvm' 4 | } 5 | 6 | java { 7 | sourceCompatibility = JavaVersion.VERSION_1_8 8 | targetCompatibility = JavaVersion.VERSION_1_8 9 | } 10 | -------------------------------------------------------------------------------- /startup-processor/src/main/java/com/geelee/startup/processor/ktx/Iterable.kt: -------------------------------------------------------------------------------- 1 | package com.geelee.startup.processor.ktx 2 | 3 | operator fun Iterable.contains(condition: (T) -> Boolean): Boolean { 4 | return find { 5 | condition(it) 6 | } != null 7 | } 8 | -------------------------------------------------------------------------------- /startup-processor/src/main/java/com/geelee/startup/processor/ILogger.kt: -------------------------------------------------------------------------------- 1 | package com.geelee.startup.processor 2 | 3 | 4 | /** 5 | * Created by zhiyueli on 2021/6/30. 6 | */ 7 | interface ILogger { 8 | fun i(msg: String) 9 | fun e(msg: String, throwable: Throwable) 10 | } -------------------------------------------------------------------------------- /startup-processor/src/main/java/com/geelee/startup/processor/exception/IllegalAnnotationException.kt: -------------------------------------------------------------------------------- 1 | package com.geelee.startup.processor.exception 2 | 3 | 4 | /** 5 | * Created by zhiyueli on 2021/5/29. 6 | * 7 | * 注解使用错误时抛出异常 8 | */ 9 | class IllegalAnnotationException(msg: String) : Exception(msg) -------------------------------------------------------------------------------- /startup/src/main/java/com/geelee/startup/IStartupLogger.kt: -------------------------------------------------------------------------------- 1 | package com.geelee.startup 2 | 3 | 4 | /** 5 | * Created by zhiyueli on 2021/6/30. 6 | */ 7 | interface IStartupLogger { 8 | fun i(msg: String) 9 | fun e(msg: String, throwable: Throwable) 10 | fun isDebugVersion(): Boolean 11 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | gradlePluginPortal() 6 | } 7 | } 8 | 9 | rootProject.name = "Startup" 10 | include ':app' 11 | include ':startup' 12 | include ':startup-annotation' 13 | include ':startup-processor' 14 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Nov 13 16:05:10 CST 2023 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | kapt.use.worker.api=true 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/geelee/startup/demo/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.geelee.startup.demo 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | 6 | class MainActivity : AppCompatActivity() { 7 | override fun onCreate(savedInstanceState: Bundle?) { 8 | super.onCreate(savedInstanceState) 9 | setContentView(R.layout.activity_main) 10 | } 11 | } -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 |