diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f0c5069
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,16 @@
+*.iml
+.gradle
+/.idea
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
+.cxx
+local.properties
diff --git a/account/.gitignore b/account/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/account/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/account/build.gradle b/account/build.gradle
new file mode 100644
index 0000000..278b600
--- /dev/null
+++ b/account/build.gradle
@@ -0,0 +1,2 @@
+apply from: "${rootProject.rootDir}/assembly.gradle"
+project.ext.setAppOrLibDefaultConfig project
\ No newline at end of file
diff --git a/account/consumer-rules.pro b/account/consumer-rules.pro
new file mode 100644
index 0000000..e69de29
diff --git a/account/proguard-rules.pro b/account/proguard-rules.pro
new file mode 100644
index 0000000..481bb43
--- /dev/null
+++ b/account/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/account/src/androidTest/java/com/abner/account/ExampleInstrumentedTest.kt b/account/src/androidTest/java/com/abner/account/ExampleInstrumentedTest.kt
new file mode 100644
index 0000000..3a2cfa6
--- /dev/null
+++ b/account/src/androidTest/java/com/abner/account/ExampleInstrumentedTest.kt
@@ -0,0 +1,24 @@
+package com.abner.account
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.AndroidJUnit4
+
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import org.junit.Assert.*
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+@RunWith(AndroidJUnit4::class)
+class ExampleInstrumentedTest {
+ @Test
+ fun useAppContext() {
+ // Context of the app under test.
+ val appContext = InstrumentationRegistry.getInstrumentation().targetContext
+ assertEquals("com.abner.account.test", appContext.packageName)
+ }
+}
\ No newline at end of file
diff --git a/account/src/main/AndroidManifest.xml b/account/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..54fa484
--- /dev/null
+++ b/account/src/main/AndroidManifest.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/account/src/main/java/com/abner/account/AccountActivity.kt b/account/src/main/java/com/abner/account/AccountActivity.kt
new file mode 100644
index 0000000..44d7d3f
--- /dev/null
+++ b/account/src/main/java/com/abner/account/AccountActivity.kt
@@ -0,0 +1,52 @@
+package com.abner.account
+
+import android.os.Bundle
+import android.widget.Button
+import android.widget.Toast
+import androidx.appcompat.app.AppCompatActivity
+import com.abner.common.router.CommonRouterConstant
+import com.abner.common.router.CommonRouterManger
+import com.abner.common.utils.CommonUserUtils
+import com.alibaba.android.arouter.facade.annotation.Route
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/8
+ *INTRODUCE:Account页面
+ */
+@Route(path = CommonRouterConstant.ACCOUNT)
+class AccountActivity : AppCompatActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_account)
+
+ //普通页面跳转
+ findViewById(R.id.btn_code).setOnClickListener {
+ CommonRouterManger.instance.navigationActivity(CommonRouterConstant.CODE)
+ }
+ //页面带参数跳转
+ findViewById(R.id.btn_code_params).setOnClickListener {
+ CommonRouterManger.instance.navigationActivityParams(
+ CommonRouterConstant.CODE,
+ "params" to "我是携带的参数",
+ "params2" to 100
+ )
+ }
+
+ //模拟登录,真实业务中,请以实际为准,目前只是测试
+ findViewById(R.id.btn_login).setOnClickListener {
+ //登录成功之后,保存用户信息,格式自定义,请以实际为准,当前为Demo测试
+ val json = "{\n" +
+ "\t\"code\": 0,\n" +
+ "\t\"message\": \"登录成功\",\n" +
+ "\t\"data\": {\n" +
+ "\t\t\"userName\": \"Abner0002323\",\n" +
+ "\t\t\"userId\": \"896767898989989879\",\n" +
+ "\t\t\"nickName\": \"AbnerMing\"\n" +
+ "\t}\n" +
+ "}"
+ CommonUserUtils.instance.setUser(json)
+ Toast.makeText(this, "模拟登录成功", Toast.LENGTH_SHORT).show()
+ }
+ }
+}
\ No newline at end of file
diff --git a/account/src/main/java/com/abner/account/AccountApp.kt b/account/src/main/java/com/abner/account/AccountApp.kt
new file mode 100644
index 0000000..fd3e81a
--- /dev/null
+++ b/account/src/main/java/com/abner/account/AccountApp.kt
@@ -0,0 +1,14 @@
+package com.abner.account
+
+import android.app.Application
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/8
+ *INTRODUCE:
+ */
+class AccountApp :Application(){
+ override fun onCreate() {
+ super.onCreate()
+ }
+}
\ No newline at end of file
diff --git a/account/src/main/java/com/abner/account/iml/AccountUserServiceIml.kt b/account/src/main/java/com/abner/account/iml/AccountUserServiceIml.kt
new file mode 100644
index 0000000..3001ea6
--- /dev/null
+++ b/account/src/main/java/com/abner/account/iml/AccountUserServiceIml.kt
@@ -0,0 +1,53 @@
+package com.abner.account.iml
+
+import android.app.AlertDialog
+import android.content.Context
+import android.text.TextUtils
+import com.abner.common.data.bean.UserInfo
+import com.abner.common.router.CommonRouterConstant
+import com.abner.common.service.AccountUserService
+import com.abner.common.utils.DataStoreUtils
+import com.alibaba.android.arouter.facade.annotation.Route
+import com.google.gson.Gson
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/10
+ *INTRODUCE:
+ */
+@Route(path = CommonRouterConstant.USER_INFO, name = "AccountUserServiceIml")
+class AccountUserServiceIml : AccountUserService {
+
+ override fun getUser(): UserInfo? {
+ //获取用户信息后,转成需要的对象
+ val userJson = DataStoreUtils.getSyncData("user", "")
+ if (TextUtils.isEmpty(userJson)) {
+ return null
+ }
+ return Gson().fromJson(userJson, UserInfo::class.java)
+ }
+
+ /**
+ * AUTHOR:AbnerMing
+ * INTRODUCE:测试弹窗或其他功能
+ */
+ override fun showDialog() {
+ AlertDialog.Builder(mContext)
+ .setTitle("测试一个Dialog弹出框")
+ .setMessage("简单测试以下")
+ .setNegativeButton("取消") { _, _ ->
+
+ }
+ .setPositiveButton("确定") { _, _ ->
+
+
+ }
+ .show()
+ }
+
+ private var mContext: Context? = null
+
+ override fun init(context: Context?) {
+ mContext = context
+ }
+}
\ No newline at end of file
diff --git a/account/src/main/manifest/AndroidManifest.xml b/account/src/main/manifest/AndroidManifest.xml
new file mode 100644
index 0000000..1cbc43c
--- /dev/null
+++ b/account/src/main/manifest/AndroidManifest.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/account/src/main/res/layout/activity_account.xml b/account/src/main/res/layout/activity_account.xml
new file mode 100644
index 0000000..20daf5c
--- /dev/null
+++ b/account/src/main/res/layout/activity_account.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/account/src/main/res/mipmap-xhdpi/ic_launcher.png b/account/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..6dba46d
Binary files /dev/null and b/account/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/account/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/account/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..da31a87
Binary files /dev/null and b/account/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/account/src/main/res/values/colors.xml b/account/src/main/res/values/colors.xml
new file mode 100644
index 0000000..f8c6127
--- /dev/null
+++ b/account/src/main/res/values/colors.xml
@@ -0,0 +1,10 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+
\ No newline at end of file
diff --git a/account/src/main/res/values/strings.xml b/account/src/main/res/values/strings.xml
new file mode 100644
index 0000000..8d6c9a2
--- /dev/null
+++ b/account/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ Account
+
\ No newline at end of file
diff --git a/account/src/main/res/values/themes.xml b/account/src/main/res/values/themes.xml
new file mode 100644
index 0000000..a923fc6
--- /dev/null
+++ b/account/src/main/res/values/themes.xml
@@ -0,0 +1,16 @@
+
+
+
+
\ No newline at end of file
diff --git a/account/src/test/java/com/abner/account/ExampleUnitTest.kt b/account/src/test/java/com/abner/account/ExampleUnitTest.kt
new file mode 100644
index 0000000..6376bde
--- /dev/null
+++ b/account/src/test/java/com/abner/account/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package com.abner.account
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644
index 0000000..fc9e345
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,2 @@
+apply from: "${rootProject.rootDir}/assembly.gradle"
+project.ext.setAppDefaultConfig project
\ No newline at end of file
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..fe5b536
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,32 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
+
+# arouter
+-keep public class com.alibaba.android.arouter.routes.**{*;}
+-keep public class com.alibaba.android.arouter.facade.**{*;}
+-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
+
+# 如果使用了 byType 的方式获取 Service,需添加下面规则,保护接口
+-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
+
+# 如果使用了 单类注入,即不定义接口实现 IProvider,需添加下面规则,保护实现
+# -keep class * implements com.alibaba.android.arouter.facade.template.IProvider
\ No newline at end of file
diff --git a/app/src/androidTest/java/com/abner/assembly/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/abner/assembly/ExampleInstrumentedTest.kt
new file mode 100644
index 0000000..87ec27c
--- /dev/null
+++ b/app/src/androidTest/java/com/abner/assembly/ExampleInstrumentedTest.kt
@@ -0,0 +1,24 @@
+package com.abner.assembly
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.AndroidJUnit4
+
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import org.junit.Assert.*
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+@RunWith(AndroidJUnit4::class)
+class ExampleInstrumentedTest {
+ @Test
+ fun useAppContext() {
+ // Context of the app under test.
+ val appContext = InstrumentationRegistry.getInstrumentation().targetContext
+ assertEquals("com.abner.assembly", appContext.packageName)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..5a31f04
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/abner/assembly/App.kt b/app/src/main/java/com/abner/assembly/App.kt
new file mode 100644
index 0000000..f22be49
--- /dev/null
+++ b/app/src/main/java/com/abner/assembly/App.kt
@@ -0,0 +1,15 @@
+package com.abner.assembly
+
+import com.abner.common.CommonApp
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/8
+ *INTRODUCE:
+ */
+class App : CommonApp() {
+
+ override fun isDebug(): Boolean {
+ return BuildConfig.DEBUG
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/abner/assembly/MainActivity.kt b/app/src/main/java/com/abner/assembly/MainActivity.kt
new file mode 100644
index 0000000..3af5e7d
--- /dev/null
+++ b/app/src/main/java/com/abner/assembly/MainActivity.kt
@@ -0,0 +1,23 @@
+package com.abner.assembly
+
+import android.os.Bundle
+import android.widget.Button
+import androidx.appcompat.app.AppCompatActivity
+import com.abner.common.router.CommonRouterConstant
+import com.abner.common.router.CommonRouterManger
+
+class MainActivity : AppCompatActivity() {
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_main)
+ //模拟跳转account组件
+ findViewById(R.id.btn_account).setOnClickListener {
+ CommonRouterManger.instance.navigationActivity(CommonRouterConstant.ACCOUNT)
+ }
+ //模拟跳转code组件
+ findViewById(R.id.btn_code).setOnClickListener {
+ CommonRouterManger.instance.navigationActivity(CommonRouterConstant.CODE)
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..2b068d1
--- /dev/null
+++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..07d5da9
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..39f8785
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..a571e60
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..61da551
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c41dd28
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..db5080a
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..6dba46d
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..da31a87
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..15ac681
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..b216f2d
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..f25a419
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..e96783c
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml
new file mode 100644
index 0000000..67e887d
--- /dev/null
+++ b/app/src/main/res/values-night/themes.xml
@@ -0,0 +1,16 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..f8c6127
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,10 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..cc55ce2
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ AndroidAssembly
+
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
new file mode 100644
index 0000000..866c9a4
--- /dev/null
+++ b/app/src/main/res/values/themes.xml
@@ -0,0 +1,16 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/test/java/com/abner/assembly/ExampleUnitTest.kt b/app/src/test/java/com/abner/assembly/ExampleUnitTest.kt
new file mode 100644
index 0000000..47efb9e
--- /dev/null
+++ b/app/src/test/java/com/abner/assembly/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package com.abner.assembly
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
\ No newline at end of file
diff --git a/assembly.gradle b/assembly.gradle
new file mode 100644
index 0000000..2dda8ed
--- /dev/null
+++ b/assembly.gradle
@@ -0,0 +1,167 @@
+project.ext {
+ //是否允许module单独调试
+ isModuleDebug = false
+ moduleName = ""//单独调试module名
+ //基础信息配置
+ compileSdkVersion = 30
+ buildToolsVersion = "30.0.2"
+ minSdkVersion = 21
+ targetSdkVersion = 30
+ applicationId = "com.abner.assembly"
+ versionCode = 1
+ versionName = "1.0.0"
+
+ //设置app配置
+ setAppDefaultConfig = {
+ extension ->
+ //指定为application
+ extension.apply plugin: 'com.android.application'
+ extension.description "app"
+
+ //公共的apply 主要是用于三方库
+ extension.apply plugin: 'kotlin-android'
+ extension.apply plugin: 'kotlin-parcelize'
+ extension.apply plugin: 'kotlin-kapt'
+
+ appImplementation = "app"
+ //设置项目的android
+ setAppAndroidConfig extension.android
+ //设置项目的三方库依赖
+ setDependencies extension.dependencies
+
+ }
+
+ //设置application 公共的android配置
+ setAppAndroidConfig = {
+ extension ->
+ extension.compileSdkVersion project.ext.compileSdkVersion
+ extension.buildToolsVersion project.ext.buildToolsVersion
+ extension.defaultConfig {
+ applicationId project.ext.applicationId
+ minSdkVersion project.ext.minSdkVersion
+ targetSdkVersion project.ext.targetSdkVersion
+ versionCode project.ext.versionCode
+ versionName project.ext.versionName
+ extension.flavorDimensions "versionCode"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = [AROUTER_MODULE_NAME: project.getName()]
+ }
+ }
+ }
+
+ extension.compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+ extension.kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ extension.buildFeatures.dataBinding = true
+ }
+
+ //动态改变,用于单模块调试
+ setAppOrLibDefaultConfig = {
+ extension ->
+ if (project.ext.isModuleDebug && project.ext.moduleName == project.name) {
+ extension.apply plugin: 'com.android.application'
+ extension.description "app"
+ } else {
+ extension.apply plugin: 'com.android.library'
+ extension.description "lib"
+
+ }
+ extension.apply plugin: 'kotlin-android'
+ extension.apply plugin: 'kotlin-parcelize'
+ extension.apply plugin: 'kotlin-kapt'
+
+ appImplementation = project.name
+
+ //设置通用Android配置
+ setAppOrLibAndroidConfig extension.android
+ //设置通用依赖配置
+ setDependencies extension.dependencies
+ }
+
+ //设置通用的 android配置(可作为project单独调试)
+ setAppOrLibAndroidConfig = {
+ extension ->
+ extension.compileSdkVersion project.ext.compileSdkVersion
+ extension.buildToolsVersion project.ext.buildToolsVersion
+ extension.defaultConfig {
+ minSdkVersion project.ext.minSdkVersion
+ targetSdkVersion project.ext.targetSdkVersion
+ versionCode project.ext.versionCode
+ versionName project.ext.versionName
+ extension.flavorDimensions "versionCode"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ //ARouter 编译生成路由
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = [AROUTER_MODULE_NAME: project.getName()]
+ }
+ }
+ }
+
+ //使用的jdk版本
+ extension.compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+ extension.kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ //动态改变清单文件资源指向
+ extension.sourceSets {
+ main {
+ if (project.ext.isModuleDebug && project.ext.moduleName == project.name) {
+ manifest.srcFile 'src/main/manifest/AndroidManifest.xml'
+ } else {
+ manifest.srcFile 'src/main/AndroidManifest.xml'
+ }
+ }
+ }
+
+ }
+
+
+ //公用的三方库依赖,慎重引入,主要引入基础库依赖
+ setDependencies = {
+ extension ->
+ extension.implementation fileTree(dir: 'libs', include: ['*.jar'])
+ extension.implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
+ extension.implementation 'androidx.core:core-ktx:1.3.1'
+ extension.implementation 'androidx.appcompat:appcompat:1.3.1'
+ extension.implementation 'com.google.android.material:material:1.4.0'
+ extension.implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
+ extension.testImplementation 'junit:junit:4.+'
+ extension.androidTestImplementation 'androidx.test.ext:junit:1.1.2'
+ extension.androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
+ extension.kapt 'com.alibaba:arouter-compiler:1.5.2'
+ if (appImplementation != "common") {
+ //common做为中间层,所有的Module都要依赖
+ extension.implementation extension.project(path: ':common')
+ }
+ //针对每个Module单独进行依赖
+ switch (appImplementation) {
+ case "app":
+ extension.implementation extension.project(path: ':account')
+ extension.implementation extension.project(path: ':code')
+ break
+ case "account":
+
+ break
+ case "common"://common组件是一个中间层,所有的组件都需要依赖此组件,公共的依赖便可放到这里
+ extension.api 'com.alibaba:arouter-api:1.5.2'//ARouter依赖
+ //datastore 存储数据,仅用于测试
+ extension.implementation "androidx.datastore:datastore-preferences:1.0.0"
+ //gson,仅用于测试
+ extension.api 'com.google.code.gson:gson:2.8.5'
+ break
+ }
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..bc39996
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,27 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+buildscript {
+ ext.kotlin_version = "1.5.21"
+ repositories {
+ google()
+ mavenCentral()
+ }
+ dependencies {
+ classpath "com.android.tools.build:gradle:4.2.0"
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ jcenter() // Warning: this repository is going to shut down soon
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
\ No newline at end of file
diff --git a/code/.gitignore b/code/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/code/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/code/build.gradle b/code/build.gradle
new file mode 100644
index 0000000..278b600
--- /dev/null
+++ b/code/build.gradle
@@ -0,0 +1,2 @@
+apply from: "${rootProject.rootDir}/assembly.gradle"
+project.ext.setAppOrLibDefaultConfig project
\ No newline at end of file
diff --git a/code/consumer-rules.pro b/code/consumer-rules.pro
new file mode 100644
index 0000000..e69de29
diff --git a/code/proguard-rules.pro b/code/proguard-rules.pro
new file mode 100644
index 0000000..481bb43
--- /dev/null
+++ b/code/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/code/src/androidTest/java/com/abner/code/ExampleInstrumentedTest.kt b/code/src/androidTest/java/com/abner/code/ExampleInstrumentedTest.kt
new file mode 100644
index 0000000..c97d3e0
--- /dev/null
+++ b/code/src/androidTest/java/com/abner/code/ExampleInstrumentedTest.kt
@@ -0,0 +1,24 @@
+package com.abner.code
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.AndroidJUnit4
+
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import org.junit.Assert.*
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+@RunWith(AndroidJUnit4::class)
+class ExampleInstrumentedTest {
+ @Test
+ fun useAppContext() {
+ // Context of the app under test.
+ val appContext = InstrumentationRegistry.getInstrumentation().targetContext
+ assertEquals("com.abner.code.test", appContext.packageName)
+ }
+}
\ No newline at end of file
diff --git a/code/src/main/AndroidManifest.xml b/code/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..1387ed0
--- /dev/null
+++ b/code/src/main/AndroidManifest.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/code/src/main/java/com/abner/code/CodeActivity.kt b/code/src/main/java/com/abner/code/CodeActivity.kt
new file mode 100644
index 0000000..e36f8b0
--- /dev/null
+++ b/code/src/main/java/com/abner/code/CodeActivity.kt
@@ -0,0 +1,75 @@
+package com.abner.code
+
+import android.os.Bundle
+import android.util.Log
+import android.widget.Button
+import android.widget.Toast
+import androidx.appcompat.app.AppCompatActivity
+import com.abner.common.router.CommonRouterConstant
+import com.abner.common.service.AccountUserService
+import com.abner.common.service.CommonRouteServiceManager
+import com.abner.common.utils.CommonUserUtils
+import com.alibaba.android.arouter.facade.annotation.Autowired
+import com.alibaba.android.arouter.facade.annotation.Route
+import com.alibaba.android.arouter.launcher.ARouter
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/7
+ *INTRODUCE:
+ */
+@Route(path = CommonRouterConstant.CODE)
+class CodeActivity : AppCompatActivity() {
+
+ //ARouter 形式接收参数
+ @Autowired(name = "params")
+ @JvmField
+ var mParams = ""
+
+ @Autowired(name = "params2")
+ @JvmField
+ var mParams2 = -1
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_code)
+ //intent 方式 接收参数
+ val stringExtra = intent.getStringExtra("params")
+ val intExtra = intent.getIntExtra("params2", -1)
+
+ Log.e("CodeActivity", "intent 接收参数1:$stringExtra,接收参数2:$intExtra")
+
+ //ARouter 形式 接收参数,需要初始化
+ ARouter.getInstance().inject(this)
+ //打印数据
+ Log.e("CodeActivity", "ARouter 接收参数1:$mParams,接收参数2:$mParams2")
+
+ findViewById(R.id.btn_get_params).setOnClickListener {
+ //获取传递的参数,普通跳转没有
+ Toast.makeText(this, "ARouter 接收参数1:$mParams,接收参数2:$mParams2", Toast.LENGTH_SHORT)
+ .show()
+ }
+
+ findViewById(R.id.btn_user_info).setOnClickListener {
+ //模拟,进行获取用户相关信息
+ CommonUserUtils.instance.getUser()?.let {
+ Toast.makeText(this, it.data?.nickName, Toast.LENGTH_SHORT).show()
+ }
+ }
+
+ //组件之间通过类名称发现服务
+ val iml = CommonRouteServiceManager.provide(AccountUserService::class.java)
+ iml?.init(this)
+
+ findViewById(R.id.btn_user_service).setOnClickListener {
+ //模拟,通过服务进行获取用户相关信息
+ iml?.getUser()?.let {
+ Toast.makeText(this, it.data?.nickName, Toast.LENGTH_SHORT).show()
+ }
+ }
+ findViewById(R.id.btn_user_dialog).setOnClickListener {
+ //模拟,通过服务进行获取用户相关信息
+ iml?.showDialog()
+ }
+ }
+}
\ No newline at end of file
diff --git a/code/src/main/java/com/abner/code/CodeApp.kt b/code/src/main/java/com/abner/code/CodeApp.kt
new file mode 100644
index 0000000..5f4241a
--- /dev/null
+++ b/code/src/main/java/com/abner/code/CodeApp.kt
@@ -0,0 +1,14 @@
+package com.abner.code
+
+import android.app.Application
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/8
+ *INTRODUCE:
+ */
+class CodeApp : Application() {
+ override fun onCreate() {
+ super.onCreate()
+ }
+}
\ No newline at end of file
diff --git a/code/src/main/manifest/AndroidManifest.xml b/code/src/main/manifest/AndroidManifest.xml
new file mode 100644
index 0000000..6fe45a1
--- /dev/null
+++ b/code/src/main/manifest/AndroidManifest.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/code/src/main/res/layout/activity_code.xml b/code/src/main/res/layout/activity_code.xml
new file mode 100644
index 0000000..033e3c2
--- /dev/null
+++ b/code/src/main/res/layout/activity_code.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/code/src/main/res/mipmap-xhdpi/ic_launcher.png b/code/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..6dba46d
Binary files /dev/null and b/code/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/code/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/code/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..da31a87
Binary files /dev/null and b/code/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/code/src/main/res/values/colors.xml b/code/src/main/res/values/colors.xml
new file mode 100644
index 0000000..f8c6127
--- /dev/null
+++ b/code/src/main/res/values/colors.xml
@@ -0,0 +1,10 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+
\ No newline at end of file
diff --git a/code/src/main/res/values/strings.xml b/code/src/main/res/values/strings.xml
new file mode 100644
index 0000000..8d6c9a2
--- /dev/null
+++ b/code/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ Account
+
\ No newline at end of file
diff --git a/code/src/main/res/values/themes.xml b/code/src/main/res/values/themes.xml
new file mode 100644
index 0000000..d24cfc4
--- /dev/null
+++ b/code/src/main/res/values/themes.xml
@@ -0,0 +1,16 @@
+
+
+
+
\ No newline at end of file
diff --git a/code/src/test/java/com/abner/code/ExampleUnitTest.kt b/code/src/test/java/com/abner/code/ExampleUnitTest.kt
new file mode 100644
index 0000000..0922dc6
--- /dev/null
+++ b/code/src/test/java/com/abner/code/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package com.abner.code
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
\ No newline at end of file
diff --git a/common/.gitignore b/common/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/common/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/common/build.gradle b/common/build.gradle
new file mode 100644
index 0000000..278b600
--- /dev/null
+++ b/common/build.gradle
@@ -0,0 +1,2 @@
+apply from: "${rootProject.rootDir}/assembly.gradle"
+project.ext.setAppOrLibDefaultConfig project
\ No newline at end of file
diff --git a/common/consumer-rules.pro b/common/consumer-rules.pro
new file mode 100644
index 0000000..e69de29
diff --git a/common/proguard-rules.pro b/common/proguard-rules.pro
new file mode 100644
index 0000000..481bb43
--- /dev/null
+++ b/common/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/common/src/androidTest/java/com/abner/common/ExampleInstrumentedTest.kt b/common/src/androidTest/java/com/abner/common/ExampleInstrumentedTest.kt
new file mode 100644
index 0000000..8a3e280
--- /dev/null
+++ b/common/src/androidTest/java/com/abner/common/ExampleInstrumentedTest.kt
@@ -0,0 +1,24 @@
+package com.abner.common
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.AndroidJUnit4
+
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import org.junit.Assert.*
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+@RunWith(AndroidJUnit4::class)
+class ExampleInstrumentedTest {
+ @Test
+ fun useAppContext() {
+ // Context of the app under test.
+ val appContext = InstrumentationRegistry.getInstrumentation().targetContext
+ assertEquals("com.abner.common.test", appContext.packageName)
+ }
+}
\ No newline at end of file
diff --git a/common/src/main/AndroidManifest.xml b/common/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..770d23a
--- /dev/null
+++ b/common/src/main/AndroidManifest.xml
@@ -0,0 +1,5 @@
+
+
+
+
\ No newline at end of file
diff --git a/common/src/main/java/com/abner/common/CommonApp.kt b/common/src/main/java/com/abner/common/CommonApp.kt
new file mode 100644
index 0000000..08da6b2
--- /dev/null
+++ b/common/src/main/java/com/abner/common/CommonApp.kt
@@ -0,0 +1,30 @@
+package com.abner.common
+
+import android.app.Application
+import android.util.Log
+import com.abner.common.utils.DataStoreUtils
+import com.alibaba.android.arouter.launcher.ARouter
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/8
+ *INTRODUCE:初始化
+ */
+abstract class CommonApp : Application() {
+ override fun onCreate() {
+ super.onCreate()
+ if (isDebug()) { // 这两行必须写在init之前,否则这些配置在init过程中将无效
+ ARouter.openLog() // 打印日志
+ ARouter.openDebug() // 开启调试模式(如果在InstantRun模式下运行,必须开启调试模式!线上版本需要关闭,否则有安全风险)
+ }
+ ARouter.init(this) // 尽可能早,推荐在Application中初始化
+
+ DataStoreUtils.init(this)
+ }
+
+ /**
+ * AUTHOR:AbnerMing
+ * INTRODUCE:是否是测试环境
+ */
+ abstract fun isDebug(): Boolean
+}
\ No newline at end of file
diff --git a/common/src/main/java/com/abner/common/data/bean/UserInfo.kt b/common/src/main/java/com/abner/common/data/bean/UserInfo.kt
new file mode 100644
index 0000000..437bc3d
--- /dev/null
+++ b/common/src/main/java/com/abner/common/data/bean/UserInfo.kt
@@ -0,0 +1,18 @@
+package com.abner.common.data.bean
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/9
+ *INTRODUCE:测试用户对象
+ */
+class UserInfo {
+ var code: Int? = null
+ var message: String? = null
+ var data: User? = null
+
+ class User {
+ var userName: String? = null
+ var userId: String? = null
+ var nickName: String? = null
+ }
+}
\ No newline at end of file
diff --git a/common/src/main/java/com/abner/common/router/CommonRouterConstant.kt b/common/src/main/java/com/abner/common/router/CommonRouterConstant.kt
new file mode 100644
index 0000000..73857b0
--- /dev/null
+++ b/common/src/main/java/com/abner/common/router/CommonRouterConstant.kt
@@ -0,0 +1,17 @@
+package com.abner.common.router
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/8
+ *INTRODUCE:Router常量
+ */
+object CommonRouterConstant {
+ //Account页面
+ const val ACCOUNT = "/account/AccountActivity"
+
+ //code页面
+ const val CODE = "/code/CodeActivity"
+
+ //获取用户信息
+ const val USER_INFO = "/common/AccountUserServiceIml"
+}
\ No newline at end of file
diff --git a/common/src/main/java/com/abner/common/router/CommonRouterManger.kt b/common/src/main/java/com/abner/common/router/CommonRouterManger.kt
new file mode 100644
index 0000000..e2b7b58
--- /dev/null
+++ b/common/src/main/java/com/abner/common/router/CommonRouterManger.kt
@@ -0,0 +1,79 @@
+package com.abner.common.router
+
+import android.app.Activity
+import android.os.Bundle
+import com.alibaba.android.arouter.facade.Postcard
+import com.alibaba.android.arouter.launcher.ARouter
+import java.io.Serializable
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/8
+ *INTRODUCE:路由跳转
+ */
+class CommonRouterManger private constructor() {
+ companion object {
+ val instance by lazy(LazyThreadSafetyMode.NONE) {
+ CommonRouterManger()
+ }
+ }
+
+ /**
+ * AUTHOR:AbnerMing
+ *普通跳转
+ */
+ fun navigationActivity(path: String) {
+ ARouter.getInstance().build(path).navigation()
+ }
+
+ /**
+ * AUTHOR:AbnerMing
+ * INTRODUCE:回调跳转
+ */
+ fun navigationActivity(
+ path: String,
+ context: Activity,
+ requestCode: Int,
+ vararg params: Pair
+ ) {
+ ARouter.getInstance().build(path).putExtras(*params).navigation(context, requestCode)
+ }
+
+ fun navigationActivity(path: String, bundle: Bundle) {
+ ARouter.getInstance().build(path)
+ .withBundle("bundle_info", bundle).navigation()
+ }
+
+ /**
+ * AUTHOR:AbnerMing
+ * INTRODUCE:携带参数跳转
+ */
+ fun navigationActivityParams(path: String, vararg params: Pair) {
+ val navigation = ARouter.getInstance().build(path)
+ .putExtras(*params)
+ navigation.navigation()
+ }
+
+ fun Postcard.putExtras(vararg params: Pair): Postcard {
+ if (params.isEmpty()) return this
+ params.forEach { (key, value) ->
+ when (value) {
+ is Int -> withInt(key, value)
+ is String -> withString(key, value)
+ is Boolean -> withBoolean(key, value)
+ is Char -> withChar(key, value)
+ is Byte -> withByte(key, value)
+ is Float -> withFloat(key, value)
+ is Bundle -> withBundle(key, value)
+ is Double -> withDouble(key, value)
+ is ByteArray -> withByteArray(key, value)
+ is Serializable -> withSerializable(key, value)
+ is ArrayList<*> -> {
+ withStringArrayList(key, value as ArrayList)
+ }
+ is Object -> withObject(key, value)
+ }
+ }
+ return this
+ }
+}
\ No newline at end of file
diff --git a/common/src/main/java/com/abner/common/service/AccountUserService.kt b/common/src/main/java/com/abner/common/service/AccountUserService.kt
new file mode 100644
index 0000000..bd0c5ff
--- /dev/null
+++ b/common/src/main/java/com/abner/common/service/AccountUserService.kt
@@ -0,0 +1,18 @@
+package com.abner.common.service
+
+import com.abner.common.data.bean.UserInfo
+import com.alibaba.android.arouter.facade.template.IProvider
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/10
+ *INTRODUCE:
+ */
+interface AccountUserService : IProvider {
+
+ fun getUser(): UserInfo?
+
+
+ fun showDialog()
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/com/abner/common/service/CommonRouteServiceManager.kt b/common/src/main/java/com/abner/common/service/CommonRouteServiceManager.kt
new file mode 100644
index 0000000..c7462ee
--- /dev/null
+++ b/common/src/main/java/com/abner/common/service/CommonRouteServiceManager.kt
@@ -0,0 +1,53 @@
+package com.abner.common.service
+
+import android.text.TextUtils
+import com.alibaba.android.arouter.facade.template.IProvider
+import com.alibaba.android.arouter.launcher.ARouter
+import java.lang.Exception
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/8
+ *INTRODUCE:服务管理
+ */
+object CommonRouteServiceManager {
+
+ /**
+ * 模块间通过路径名称发现服务
+ * */
+ fun provide(clz: Class?, path: String?): T? {
+ if (TextUtils.isEmpty(path)) {
+ return null
+ }
+ var provider: IProvider? = null
+ try {
+ provider = ARouter.getInstance()
+ .build(path)
+ .navigation() as IProvider
+ } catch (e: Exception) {
+ e.printStackTrace()
+ }
+ return provider as T?
+ }
+
+ /**
+ * 模块间通过类名称发现服务
+ * */
+ fun provide(clz: Class?): T? {
+ var provider: IProvider? = null
+ try {
+ provider = ARouter.getInstance().navigation(clz)
+ } catch (e: Exception) {
+ e.printStackTrace()
+ }
+ return provider as T?
+ }
+
+
+ /**
+ * 获取服务.
+ * @return T? 接口
+ */
+ inline fun getProvideService(): T? =
+ ARouter.getInstance().navigation(T::class.java)
+}
\ No newline at end of file
diff --git a/common/src/main/java/com/abner/common/utils/CommonUserUtils.kt b/common/src/main/java/com/abner/common/utils/CommonUserUtils.kt
new file mode 100644
index 0000000..bee1f16
--- /dev/null
+++ b/common/src/main/java/com/abner/common/utils/CommonUserUtils.kt
@@ -0,0 +1,57 @@
+package com.abner.common.utils
+
+import android.text.TextUtils
+import com.abner.common.data.bean.UserInfo
+import com.abner.common.utils.DataStoreUtils.getSyncData
+import com.abner.common.utils.DataStoreUtils.putSyncData
+import com.google.gson.Gson
+
+/**
+ *AUTHOR:AbnerMing
+ *DATE:2022/9/9
+ *INTRODUCE:
+ */
+class CommonUserUtils {
+
+ companion object {
+ val instance by lazy(LazyThreadSafetyMode.NONE) {
+ CommonUserUtils()
+ }
+ }
+
+ /**
+ * AUTHOR:AbnerMing
+ * INTRODUCE:是否登录,实际业务中,请根据存储的用户信息进行判断
+ */
+ fun isLogin(): Boolean {
+ if (getUser() != null &&
+ getUser()?.data != null
+ && !TextUtils.isEmpty(getUser()?.data?.userId)
+ ) {
+ return true
+ }
+ return false
+ }
+
+ /**
+ * AUTHOR:AbnerMing
+ * INTRODUCE:获取存储的用户信息,请根据实际业务进行返回,当前仅用于测试
+ */
+ fun getUser(): UserInfo? {
+ //获取用户信息后,转成需要的对象
+ val userJson = getSyncData("user", "")
+ if (TextUtils.isEmpty(userJson)) {
+ return null
+ }
+ return Gson().fromJson(userJson, UserInfo::class.java)
+ }
+
+ /**
+ * AUTHOR:AbnerMing
+ * INTRODUCE:保存用户数据,请以实际为准
+ */
+ fun setUser(json: String) {
+ //存储用户信息
+ putSyncData("user", json)
+ }
+}
\ No newline at end of file
diff --git a/common/src/main/java/com/abner/common/utils/DataStoreUtils.kt b/common/src/main/java/com/abner/common/utils/DataStoreUtils.kt
new file mode 100644
index 0000000..e2f84a9
--- /dev/null
+++ b/common/src/main/java/com/abner/common/utils/DataStoreUtils.kt
@@ -0,0 +1,275 @@
+package com.abner.common.utils
+
+import android.content.Context
+import androidx.datastore.core.DataStore
+import androidx.datastore.preferences.core.*
+import androidx.datastore.preferences.preferencesDataStore
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.catch
+import kotlinx.coroutines.flow.first
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.runBlocking
+import java.io.IOException
+
+/**
+ *
+ *
+ * 异步获取数据
+ * [getData] [readBooleanFlow] [readFloatFlow] [readIntFlow] [readLongFlow] [readStringFlow]
+ * 同步获取数据
+ * [getSyncData] [readBooleanData] [readFloatData] [readIntData] [readLongData] [readStringData]
+ *
+ * 异步写入数据
+ * [putData] [saveBooleanData] [saveFloatData] [saveIntData] [saveLongData] [saveStringData]
+ * 同步写入数据
+ * [putSyncData] [saveSyncBooleanData] [saveSyncFloatData] [saveSyncIntData] [saveSyncLongData] [saveSyncStringData]
+ *
+ * 异步清除数据
+ * [clear]
+ * 同步清除数据
+ * [clearSync]
+ *
+ * 描述:DataStore 工具类
+ *
+ */
+
+val Context.dataStore: DataStore by preferencesDataStore(name = "GWDataStore")
+
+object DataStoreUtils {
+
+ private lateinit var dataStore: DataStore
+
+ /**
+ * init Context
+ * @param context Context
+ */
+ fun init(context: Context) {
+ dataStore = context.dataStore
+ }
+
+ @Suppress("UNCHECKED_CAST")
+ fun getSyncData(key: String, default: U): U {
+ val res = when (default) {
+ is Long -> readLongData(key, default)
+ is String -> readStringData(key, default)
+ is Int -> readIntData(key, default)
+ is Boolean -> readBooleanData(key, default)
+ is Float -> readFloatData(key, default)
+ else -> throw IllegalArgumentException("This type can be saved into DataStore")
+ }
+ return res as U
+ }
+
+ @Suppress("UNCHECKED_CAST")
+ fun getData(key: String, default: U): Flow {
+ val data = when (default) {
+ is Long -> readLongFlow(key, default)
+ is String -> readStringFlow(key, default)
+ is Int -> readIntFlow(key, default)
+ is Boolean -> readBooleanFlow(key, default)
+ is Float -> readFloatFlow(key, default)
+ else -> throw IllegalArgumentException("This type can be saved into DataStore")
+ }
+ return data as Flow
+ }
+
+ suspend fun putData(key: String, value: U) {
+ when (value) {
+ is Long -> saveLongData(key, value)
+ is String -> saveStringData(key, value)
+ is Int -> saveIntData(key, value)
+ is Boolean -> saveBooleanData(key, value)
+ is Float -> saveFloatData(key, value)
+ else -> throw IllegalArgumentException("This type can be saved into DataStore")
+ }
+ }
+
+ fun putSyncData(key: String, value: U) {
+ when (value) {
+ is Long -> saveSyncLongData(key, value)
+ is String -> saveSyncStringData(key, value)
+ is Int -> saveSyncIntData(key, value)
+ is Boolean -> saveSyncBooleanData(key, value)
+ is Float -> saveSyncFloatData(key, value)
+ else -> throw IllegalArgumentException("This type can be saved into DataStore")
+ }
+ }
+
+ fun readBooleanFlow(key: String, default: Boolean = false): Flow =
+ dataStore.data
+ .catch {
+ //当读取数据遇到错误时,如果是 `IOException` 异常,发送一个 emptyPreferences 来重新使用
+ //但是如果是其他的异常,最好将它抛出去,不要隐藏问题
+ if (it is IOException) {
+ it.printStackTrace()
+ emit(emptyPreferences())
+ } else {
+ throw it
+ }
+ }.map {
+ it[booleanPreferencesKey(key)] ?: default
+ }
+
+ fun readBooleanData(key: String, default: Boolean = false): Boolean {
+ var value = false
+ runBlocking {
+ dataStore.data.first {
+ value = it[booleanPreferencesKey(key)] ?: default
+ true
+ }
+ }
+ return value
+ }
+
+ fun readIntFlow(key: String, default: Int = 0): Flow =
+ dataStore.data
+ .catch {
+ if (it is IOException) {
+ it.printStackTrace()
+ emit(emptyPreferences())
+ } else {
+ throw it
+ }
+ }.map {
+ it[intPreferencesKey(key)] ?: default
+ }
+
+ fun readIntData(key: String, default: Int = 0): Int {
+ var value = 0
+ runBlocking {
+ dataStore.data.first {
+ value = it[intPreferencesKey(key)] ?: default
+ true
+ }
+ }
+ return value
+ }
+
+ fun readStringFlow(key: String, default: String = ""): Flow =
+ dataStore.data
+ .catch {
+ if (it is IOException) {
+ it.printStackTrace()
+ emit(emptyPreferences())
+ } else {
+ throw it
+ }
+ }.map {
+ it[stringPreferencesKey(key)] ?: default
+ }
+
+ fun readStringData(key: String, default: String = ""): String {
+ var value = ""
+ runBlocking {
+ dataStore.data.first {
+ value = it[stringPreferencesKey(key)] ?: default
+ true
+ }
+ }
+ return value
+ }
+
+ fun readFloatFlow(key: String, default: Float = 0f): Flow =
+ dataStore.data
+ .catch {
+ if (it is IOException) {
+ it.printStackTrace()
+ emit(emptyPreferences())
+ } else {
+ throw it
+ }
+ }.map {
+ it[floatPreferencesKey(key)] ?: default
+ }
+
+ fun readFloatData(key: String, default: Float = 0f): Float {
+ var value = 0f
+ runBlocking {
+ dataStore.data.first {
+ value = it[floatPreferencesKey(key)] ?: default
+ true
+ }
+ }
+ return value
+ }
+
+ fun readLongFlow(key: String, default: Long = 0L): Flow =
+ dataStore.data
+ .catch {
+ if (it is IOException) {
+ it.printStackTrace()
+ emit(emptyPreferences())
+ } else {
+ throw it
+ }
+ }.map {
+ it[longPreferencesKey(key)] ?: default
+ }
+
+ fun readLongData(key: String, default: Long = 0L): Long {
+ var value = 0L
+ runBlocking {
+ dataStore.data.first {
+ value = it[longPreferencesKey(key)] ?: default
+ true
+ }
+ }
+ return value
+ }
+
+ suspend fun saveBooleanData(key: String, value: Boolean) {
+ dataStore.edit { mutablePreferences ->
+ mutablePreferences[booleanPreferencesKey(key)] = value
+ }
+ }
+
+ fun saveSyncBooleanData(key: String, value: Boolean) =
+ runBlocking { saveBooleanData(key, value) }
+
+ suspend fun saveIntData(key: String, value: Int) {
+ dataStore.edit { mutablePreferences ->
+ mutablePreferences[intPreferencesKey(key)] = value
+ }
+ }
+
+ fun saveSyncIntData(key: String, value: Int) = runBlocking { saveIntData(key, value) }
+
+ suspend fun saveStringData(key: String, value: String) {
+ dataStore.edit { mutablePreferences ->
+ mutablePreferences[stringPreferencesKey(key)] = value
+ }
+ }
+
+ fun saveSyncStringData(key: String, value: String) = runBlocking { saveStringData(key, value) }
+
+ suspend fun saveFloatData(key: String, value: Float) {
+ dataStore.edit { mutablePreferences ->
+ mutablePreferences[floatPreferencesKey(key)] = value
+ }
+ }
+
+ fun saveSyncFloatData(key: String, value: Float) = runBlocking { saveFloatData(key, value) }
+
+ suspend fun saveLongData(key: String, value: Long) {
+ dataStore.edit { mutablePreferences ->
+ mutablePreferences[longPreferencesKey(key)] = value
+ }
+ }
+
+ fun saveSyncLongData(key: String, value: Long) = runBlocking { saveLongData(key, value) }
+
+ suspend fun clear() {
+ dataStore.edit {
+ it.clear()
+ }
+ }
+
+ fun clearSync() {
+ runBlocking {
+ dataStore.edit {
+ it.clear()
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/common/src/test/java/com/abner/common/ExampleUnitTest.kt b/common/src/test/java/com/abner/common/ExampleUnitTest.kt
new file mode 100644
index 0000000..ec8fc3f
--- /dev/null
+++ b/common/src/test/java/com/abner/common/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package com.abner.common
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..02f4670
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,20 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app"s APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+android.enableJetifier=true
+# Kotlin code style for this project: "official" or "obsolete":
+kotlin.code.style=official
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..f6b961f
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..4ba0c55
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Sep 07 10:45:35 CST 2022
+distributionBase=GRADLE_USER_HOME
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
+distributionPath=wrapper/dists
+zipStorePath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000..cccdd3d
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..f955316
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..83d06f9
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,5 @@
+rootProject.name = "AndroidAssembly"
+include ':app'
+include ':account'
+include ':code'
+include ':common'