diff --git a/app/build.gradle b/app/build.gradle index 996b46a3..08b6437a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,66 +6,16 @@ plugins { applyCrashlyticsIfRelease() android { - ndkVersion "25.0.8141415" - defaultConfig { - applicationId "app.dapk.st" - def versionJson = new groovy.json.JsonSlurper().parseText(rootProject.file('version.json').text) - versionCode versionJson.code - versionName versionJson.name - - if (isDebugBuild) { - resConfigs "en", "xxhdpi" - } else { - resConfigs "en" - } - - if (isFoss()) { - archivesBaseName = "$archivesBaseName-foss" - } - } - - bundle { - abi.enableSplit true - density.enableSplit true - language.enableSplit true - } + namespace "app.dapk.st" buildTypes { - debug { - versionNameSuffix = " [debug]" - matchingFallbacks = ['release'] - signingConfig.storeFile rootProject.file("tools/debug.keystore") - } release { - minifyEnabled true - shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard/app.pro', "proguard/serializationx.pro", "proguard/olm.pro" - - if (project.hasProperty("unsigned")) { - // releases are signed externally - } else { - signingConfig = buildTypes.debug.signingConfig - } } } - - compileOptions { - coreLibraryDesugaringEnabled true - } - - packagingOptions { - resources.excludes += "DebugProbesKt.bin" - } -} - -if (isDebugBuild) { - androidComponents { - def release = selector().withBuildType("release") - beforeVariants(release) { it.enabled = false } - } } dependencies { diff --git a/app/src/debug/AndroidManifest.xml b/app/src/debug/AndroidManifest.xml index b2bbec0c..e467a56c 100644 --- a/app/src/debug/AndroidManifest.xml +++ b/app/src/debug/AndroidManifest.xml @@ -1,6 +1,5 @@ - + - + diff --git a/build.gradle b/build.gradle index 03337c34..872de516 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,18 @@ def launchTask = getGradle() ext.isReleaseBuild = launchTask.contains("bundlerelease") || launchTask.contains("assemblerelease") ext.isDebugBuild = !isReleaseBuild +subprojects { + tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { + kotlinOptions { + jvmTarget = "1.8" + freeCompilerArgs = [ + '-opt-in=kotlin.contracts.ExperimentalContracts', + '-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi', + ] + } + } +} + task clean(type: Delete) { delete rootProject.buildDir } diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 114aa437..5e6682e2 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -8,7 +8,6 @@ repositories { } dependencies { - println(libs.versions.android.gp.get()) + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlin.get()}") implementation "com.android.tools.build:gradle:${libs.versions.android.gp.get()}" -// implementation "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20" } \ No newline at end of file diff --git a/buildSrc/src/main/groovy/st-android-compose-library-conventions.gradle b/buildSrc/src/main/groovy/st-android-compose-library-conventions.gradle index 446e6824..30ef5562 100644 --- a/buildSrc/src/main/groovy/st-android-compose-library-conventions.gradle +++ b/buildSrc/src/main/groovy/st-android-compose-library-conventions.gradle @@ -3,7 +3,9 @@ plugins { } android { - buildFeatures.compose = true + buildFeatures { + compose = true + } composeOptions { kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get() } diff --git a/buildSrc/src/main/groovy/st-android-conventions.gradle b/buildSrc/src/main/groovy/st-android-conventions.gradle index 43e5e156..59ef606b 100644 --- a/buildSrc/src/main/groovy/st-android-conventions.gradle +++ b/buildSrc/src/main/groovy/st-android-conventions.gradle @@ -1,18 +1,7 @@ plugins { -// id "kotlin-android" + id "kotlin-android" } -// -//tasks.withType(Class.forName("org.jetbrains.kotlin.gradle.tasks.KotlinCompile.KotlinCompile")).configureEach { -// kotlinOptions { -// jvmTarget = "1.8" -// freeCompilerArgs = [ -// '-opt-in=kotlin.contracts.ExperimentalContracts', -// '-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi', -// ] -// } -//} - def androidSdkVersion = 33 android { diff --git a/buildSrc/src/main/groovy/st-application-conventions.gradle b/buildSrc/src/main/groovy/st-application-conventions.gradle index f66867f9..d0b6a35c 100644 --- a/buildSrc/src/main/groovy/st-application-conventions.gradle +++ b/buildSrc/src/main/groovy/st-application-conventions.gradle @@ -2,3 +2,63 @@ plugins { id "com.android.application" id "st-android-conventions" } + +android { + ndkVersion "25.0.8141415" + defaultConfig { + applicationId "app.dapk.st" + def versionJson = new groovy.json.JsonSlurper().parseText(rootProject.file('version.json').text) + versionCode versionJson.code + versionName versionJson.name + + if (isDebugBuild) { + resConfigs "en", "xxhdpi" + } else { + resConfigs "en" + } + + if (isFoss()) { + archivesBaseName = "$archivesBaseName-foss" + } + } + + bundle { + abi.enableSplit true + density.enableSplit true + language.enableSplit true + } + + buildTypes { + debug { + versionNameSuffix = " [debug]" + matchingFallbacks = ['release'] + signingConfig.storeFile rootProject.file("tools/debug.keystore") + } + release { + minifyEnabled true + shrinkResources true + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt') + + if (project.hasProperty("unsigned")) { + // releases are signed externally + } else { + signingConfig = buildTypes.debug.signingConfig + } + } + } + + compileOptions { + coreLibraryDesugaringEnabled true + } + + packagingOptions { + resources.excludes += "DebugProbesKt.bin" + } +} + +if (isDebugBuild) { + androidComponents { + def release = selector().withBuildType("release") + beforeVariants(release) { it.enabled = false } + } +} diff --git a/chat-engine b/chat-engine index 3c8d06ad..8139eaaf 160000 --- a/chat-engine +++ b/chat-engine @@ -1 +1 @@ -Subproject commit 3c8d06ad1c22bbca69718e9b9eef3c053b1a7c2d +Subproject commit 8139eaaf57cee4ce9d0616d617e8aff7eb1480e3 diff --git a/core/build.gradle b/core/build.gradle index 6cb67caf..b83ef437 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,5 +1,5 @@ plugins { - alias libs.plugins.kotlin + id 'kotlin' id 'java-test-fixtures' } diff --git a/design-library/build.gradle b/design-library/build.gradle index c266d21c..2854c000 100644 --- a/design-library/build.gradle +++ b/design-library/build.gradle @@ -2,8 +2,12 @@ plugins { id "st-android-compose-library-conventions" } +android { + namespace "app.dapk.st.design" +} + dependencies { implementation project(":core") implementation libs.compose.coil implementation libs.accompanist.systemuicontroller -} \ No newline at end of file +} diff --git a/design-library/src/main/AndroidManifest.xml b/design-library/src/main/AndroidManifest.xml deleted file mode 100644 index 03faabdb..00000000 --- a/design-library/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/domains/android/core/build.gradle b/domains/android/core/build.gradle index 5da881b6..d3781c19 100644 --- a/domains/android/core/build.gradle +++ b/domains/android/core/build.gradle @@ -1,5 +1,5 @@ plugins { - alias libs.plugins.kotlin + id "kotlin" } dependencies { diff --git a/domains/android/stub/build.gradle b/domains/android/stub/build.gradle index f2a5b8dd..28b2175d 100644 --- a/domains/android/stub/build.gradle +++ b/domains/android/stub/build.gradle @@ -1,5 +1,5 @@ plugins { - alias libs.plugins.kotlin + id "kotlin" id 'java-test-fixtures' } diff --git a/domains/android/viewmodel-stub/build.gradle b/domains/android/viewmodel-stub/build.gradle index 23723ec1..5e66da65 100644 --- a/domains/android/viewmodel-stub/build.gradle +++ b/domains/android/viewmodel-stub/build.gradle @@ -1,3 +1,3 @@ plugins { - alias libs.plugins.kotlin + id "kotlin" } diff --git a/domains/android/viewmodel/build.gradle b/domains/android/viewmodel/build.gradle index 5a4f3755..0bfcb267 100644 --- a/domains/android/viewmodel/build.gradle +++ b/domains/android/viewmodel/build.gradle @@ -1,5 +1,5 @@ plugins { - alias libs.plugins.kotlin + id "kotlin" id 'java-test-fixtures' } diff --git a/domains/firebase/crashlytics-noop/build.gradle b/domains/firebase/crashlytics-noop/build.gradle index 1b34c7de..0321dd43 100644 --- a/domains/firebase/crashlytics-noop/build.gradle +++ b/domains/firebase/crashlytics-noop/build.gradle @@ -1,5 +1,5 @@ plugins { - alias libs.plugins.kotlin + id "kotlin" } dependencies { diff --git a/domains/store/build.gradle b/domains/store/build.gradle index 88e16739..56790dbc 100644 --- a/domains/store/build.gradle +++ b/domains/store/build.gradle @@ -1,5 +1,5 @@ plugins { - alias libs.plugins.kotlin + id 'kotlin' alias libs.plugins.kotlin.serialization alias libs.plugins.sqldelight id 'java-test-fixtures' diff --git a/features/directory/build.gradle b/features/directory/build.gradle index 2291b1b8..b3b02ef6 100644 --- a/features/directory/build.gradle +++ b/features/directory/build.gradle @@ -2,6 +2,10 @@ plugins { id "st-feature-conventions" } +android { + namespace "app.dapk.st.directory" +} + dependencies { implementation project(":domains:android:compose-core") implementation "chat-engine:chat-engine" diff --git a/features/directory/src/main/AndroidManifest.xml b/features/directory/src/main/AndroidManifest.xml deleted file mode 100644 index 49d4f8a4..00000000 --- a/features/directory/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/features/home/build.gradle b/features/home/build.gradle index d08f22cb..fc94fe67 100644 --- a/features/home/build.gradle +++ b/features/home/build.gradle @@ -2,6 +2,10 @@ plugins { id "st-feature-conventions" } +android { + namespace "app.dapk.st.home" +} + dependencies { implementation "chat-engine:chat-engine" implementation project(":features:directory") diff --git a/features/home/src/main/AndroidManifest.xml b/features/home/src/main/AndroidManifest.xml index e9b82476..67144a88 100644 --- a/features/home/src/main/AndroidManifest.xml +++ b/features/home/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/features/login/build.gradle b/features/login/build.gradle index 9e909f8b..098fa209 100644 --- a/features/login/build.gradle +++ b/features/login/build.gradle @@ -2,6 +2,10 @@ plugins { id "st-feature-conventions" } +android { + namespace "app.dapk.st.login" +} + dependencies { implementation "chat-engine:chat-engine" implementation project(":domains:android:compose-core") diff --git a/features/login/src/main/AndroidManifest.xml b/features/login/src/main/AndroidManifest.xml deleted file mode 100644 index 403513e9..00000000 --- a/features/login/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/features/messenger/build.gradle b/features/messenger/build.gradle index d242f8af..66277a97 100644 --- a/features/messenger/build.gradle +++ b/features/messenger/build.gradle @@ -1,6 +1,10 @@ plugins { id "st-feature-conventions" - alias libs.plugins.kotlin.parcelize + id "org.jetbrains.kotlin.plugin.parcelize" +} + +android { + namespace "app.dapk.st.messenger" } dependencies { diff --git a/features/messenger/src/main/AndroidManifest.xml b/features/messenger/src/main/AndroidManifest.xml index d81f7866..04e5197c 100644 --- a/features/messenger/src/main/AndroidManifest.xml +++ b/features/messenger/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/features/navigator/build.gradle b/features/navigator/build.gradle index ed63e6a8..92f97978 100644 --- a/features/navigator/build.gradle +++ b/features/navigator/build.gradle @@ -1,6 +1,10 @@ plugins { id "st-feature-conventions" - alias libs.plugins.kotlin.parcelize + id "org.jetbrains.kotlin.plugin.parcelize" +} + +android { + namespace "app.dapk.st.navigator" } dependencies { diff --git a/features/navigator/src/main/AndroidManifest.xml b/features/navigator/src/main/AndroidManifest.xml deleted file mode 100644 index 9926105f..00000000 --- a/features/navigator/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/features/notifications/build.gradle b/features/notifications/build.gradle index 21b02a13..e186dd5b 100644 --- a/features/notifications/build.gradle +++ b/features/notifications/build.gradle @@ -2,9 +2,12 @@ plugins { id "st-android-library-conventions" } +android { + namespace "app.dapk.st.notifications" +} + dependencies { implementation "chat-engine:chat-engine" -// implementation project(':domains:store') implementation project(":domains:android:work") implementation project(':domains:android:push') implementation project(":domains:android:core") @@ -13,7 +16,6 @@ dependencies { implementation project(":features:messenger") implementation project(":features:navigator") - implementation libs.kotlin.serialization kotlinTest(it) diff --git a/features/notifications/src/main/AndroidManifest.xml b/features/notifications/src/main/AndroidManifest.xml index ebdd9bb5..ffb7f703 100644 --- a/features/notifications/src/main/AndroidManifest.xml +++ b/features/notifications/src/main/AndroidManifest.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/features/profile/build.gradle b/features/profile/build.gradle index 600ec176..921a30db 100644 --- a/features/profile/build.gradle +++ b/features/profile/build.gradle @@ -2,6 +2,10 @@ plugins { id "st-feature-conventions" } +android { + namespace "app.dapk.st.profile" +} + dependencies { implementation "chat-engine:chat-engine" implementation project(":features:settings") diff --git a/features/profile/src/main/AndroidManifest.xml b/features/profile/src/main/AndroidManifest.xml deleted file mode 100644 index 8f0f1fd1..00000000 --- a/features/profile/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/screen-state b/screen-state index adb986fd..088fd0e7 160000 --- a/screen-state +++ b/screen-state @@ -1 +1 @@ -Subproject commit adb986fdfd81011978785de08b6faf37adba08aa +Subproject commit 088fd0e720acf5bc23eb8458469e782c5c10fcc7 diff --git a/settings.gradle b/settings.gradle index 7d1d0bb6..91c43432 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,6 +9,7 @@ dependencyResolutionManagement { apply from: "dependencies.gradle" applyRepositories(it) } + rootProject.name = "SmallTalk" includeBuild 'screen-state'