Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adapter/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="io.goooler.demoapp.adapter" />
<manifest />
5 changes: 2 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="io.goooler.demoapp">
xmlns:tools="http://schemas.android.com/tools">

<application
android:name=".DemoApplication"
Expand All @@ -13,4 +12,4 @@
android:theme="@style/AppTheme"
tools:ignore="MipmapIcons" />

</manifest>
</manifest>
2 changes: 1 addition & 1 deletion base/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="io.goooler.demoapp.base" />
<manifest />
22 changes: 12 additions & 10 deletions buildSrc/src/main/kotlin/Enums.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,27 @@
// TODO: Make Module sealed
interface Module {
val tag: String
val id: String
}

enum class LibModule(override val tag: String) : Module {
enum class LibModule(override val tag: String, override val id: String) : Module {
//---------------------base-------------------------------//
Base("base"),
Common("common"),
Base("base", "io.goooler.demoapp.base"),
Common("common", "io.goooler.demoapp.common"),

//---------------------biz-------------------------------//
Login("login"),
Main("main"),
Web("web"),
Login("login", "io.goooler.demoapp.login"),
Main("main", "io.goooler.demoapp.main"),
Web("web", "io.goooler.demoapp.web"),

//---------------------func-------------------------------//
Adapter("adapter")
Adapter("adapter", "io.goooler.demoapp.adapter")
}

enum class AppModule(override val tag: String, val appName: String, val appId: String) : Module {
App("app", "Demo", "io.goooler.demoapp"),
Test("app", "Test", "io.goooler.demoapp.test")
enum class AppModule(override val tag: String, override val id: String, val appName: String) :
Module {
App("app", "io.goooler.demoapp", "Demo"),
Test("app", "io.goooler.demoapp.test", "Test")
}

enum class BuildConfigField(val key: String, val value: Any) {
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ inline fun <reified T : BaseExtension> Project.setupBase(
applyPlugins(androidPlugin, Plugins.kotlinAndroid, Plugins.kotlinKapt)
extensions.configure<BaseExtension> {
resourcePrefix = "${module.tag}_"
namespace = module.id
compileSdkVersion(32)
defaultConfig {
minSdk = 21
Expand Down Expand Up @@ -179,7 +180,7 @@ fun Project.setupApp(
module: AppModule, block: BaseAppModuleExtension.() -> Unit = {}
) = setupCommon<BaseAppModuleExtension>(module) {
defaultConfig {
applicationId = module.appId
applicationId = module.id
targetSdk = 32
versionCode = appVersionCode
versionName = appVersionName
Expand All @@ -204,7 +205,6 @@ fun Project.setupApp(
debug {
resValue("string", "app_name", "${module.appName}.debug")
signingConfig = signingConfigs["release"]
applicationIdSuffix = ".debug"
isJniDebuggable = true
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2022-02-06 18:41:34.442 12006-12006/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: io.goooler.demoapp.debug, PID: 12006
    java.lang.RuntimeException: Unable to instantiate application io.goooler.demoapp.debug.DemoApplication package io.goooler.demoapp.debug: java.lang.ClassNotFoundException: Didn't find class "io.goooler.demoapp.debug.DemoApplication" on path: DexPathList[[zip file "/data/app/~~r2yVGnGnDUM5HOnrqBjkvQ==/io.goooler.demoapp.debug-gYQaJ1In2SgQAUa-U4fHng==/base.apk"],nativeLibraryDirectories=[/data/app/~~r2yVGnGnDUM5HOnrqBjkvQ==/io.goooler.demoapp.debug-gYQaJ1In2SgQAUa-U4fHng==/lib/arm64, /system/lib64, /system_ext/lib64]]
        at android.app.LoadedApk.makeApplication(LoadedApk.java:1364)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6686)
        at android.app.ActivityThread.access$1500(ActivityThread.java:247)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2053)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7839)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

isRenderscriptDebuggable = true
isCrunchPngs = false
Expand Down
3 changes: 1 addition & 2 deletions common/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.goooler.demoapp.common">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEM" />
Expand Down
3 changes: 1 addition & 2 deletions login/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.goooler.demoapp.login">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application>

Expand Down
3 changes: 1 addition & 2 deletions main/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.goooler.demoapp.main">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application>

Expand Down
5 changes: 2 additions & 3 deletions test/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="io.goooler.demoapp.test">
xmlns:tools="http://schemas.android.com/tools">

<application
android:name=".TestApplication"
Expand All @@ -15,4 +14,4 @@

</application>

</manifest>
</manifest>
5 changes: 2 additions & 3 deletions web/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.goooler.demoapp.web">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application>

Expand All @@ -10,4 +9,4 @@

</application>

</manifest>
</manifest>