Continue cleaning gradle files
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("io.element.android-compose-application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
|
||||
alias(libs.plugins.ksp) version "1.7.20-1.0.7"
|
||||
id("com.google.firebase.appdistribution") version "3.0.2"
|
||||
}
|
||||
|
||||
@@ -125,23 +125,14 @@ dependencies {
|
||||
implementation("io.github.raamcosta.compose-destinations:animations-core:1.7.23-beta")
|
||||
ksp("io.github.raamcosta.compose-destinations:ksp:1.7.23-beta")
|
||||
|
||||
val composeBom = platform("androidx.compose:compose-bom:2022.11.00")
|
||||
implementation(composeBom)
|
||||
androidTestImplementation(composeBom)
|
||||
|
||||
implementation("androidx.core:core-ktx:1.9.0")
|
||||
implementation("androidx.compose.ui:ui")
|
||||
implementation("androidx.compose.material3:material3")
|
||||
implementation("androidx.compose.ui:ui-tooling-preview")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.1")
|
||||
implementation("androidx.activity:activity-compose:1.6.1")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1")
|
||||
implementation("io.coil-kt:coil:2.2.1")
|
||||
implementation("com.jakewharton.timber:timber:5.0.1")
|
||||
debugImplementation("androidx.compose.ui:ui-tooling")
|
||||
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
||||
implementation("com.airbnb.android:mavericks-compose:3.0.1")
|
||||
|
||||
implementation("com.airbnb.android:showkase:1.0.0-beta14")
|
||||
ksp("com.airbnb.android:showkase-processor:1.0.0-beta14")
|
||||
ksp(libs.showkase.processor)
|
||||
}
|
||||
12
build.gradle
12
build.gradle
@@ -1,12 +0,0 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
// TODO Convert to .kts
|
||||
plugins {
|
||||
id 'com.android.application' version '7.3.0' apply false
|
||||
id 'com.android.library' version '7.3.0' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
|
||||
id 'com.google.devtools.ksp' version '1.7.20-1.0.7' apply false
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
11
build.gradle.kts
Normal file
11
build.gradle.kts
Normal file
@@ -0,0 +1,11 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.android.library) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
alias(libs.plugins.ksp) apply false
|
||||
}
|
||||
|
||||
tasks.register<Delete>("clean").configure {
|
||||
delete(rootProject.buildDir)
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
plugins {
|
||||
id("io.element.android-compose")
|
||||
// TODO Move to common config
|
||||
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
|
||||
id("io.element.android-compose-library")
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -14,11 +13,9 @@ dependencies {
|
||||
implementation(project(":libraries:designsystem"))
|
||||
implementation(project(":libraries:elementresources"))
|
||||
implementation(libs.mavericks.compose)
|
||||
ksp(libs.showkase.processor)
|
||||
implementation(libs.timber)
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.3")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
|
||||
testImplementation(libs.test.junit)
|
||||
androidTestImplementation(libs.test.junitext)
|
||||
|
||||
// TODO Move to common config
|
||||
ksp("com.airbnb.android:showkase-processor:1.0.0-beta14")
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
plugins {
|
||||
id("io.element.android-compose")
|
||||
// TODO Move to common config
|
||||
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
|
||||
id("io.element.android-compose-library")
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -19,11 +18,8 @@ dependencies {
|
||||
implementation(libs.datetime)
|
||||
implementation(libs.accompanist.flowlayout)
|
||||
implementation(libs.androidx.recyclerview)
|
||||
implementation("org.jsoup:jsoup:1.15.3")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.3")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
|
||||
|
||||
// TODO Move to common config
|
||||
ksp("com.airbnb.android:showkase-processor:1.0.0-beta14")
|
||||
implementation(libs.jsoup)
|
||||
testImplementation(libs.test.junit)
|
||||
androidTestImplementation(libs.test.junitext)
|
||||
ksp(libs.showkase.processor)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
plugins {
|
||||
id("io.element.android-compose")
|
||||
// TODO Move to common config
|
||||
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
|
||||
id("io.element.android-compose-library")
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -16,9 +15,7 @@ dependencies {
|
||||
implementation(libs.timber)
|
||||
implementation(libs.accompanist.pager)
|
||||
implementation(libs.accompanist.pagerindicator)
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.3")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
|
||||
// TODO Move to common config
|
||||
ksp("com.airbnb.android:showkase-processor:1.0.0-beta14")
|
||||
testImplementation(libs.test.junit)
|
||||
androidTestImplementation(libs.test.junitext)
|
||||
ksp(libs.showkase.processor)
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
plugins {
|
||||
id("io.element.android-compose")
|
||||
// TODO Move to common config
|
||||
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
|
||||
id("io.element.android-compose-library")
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -16,9 +15,7 @@ dependencies {
|
||||
implementation(libs.timber)
|
||||
implementation(libs.datetime)
|
||||
implementation(libs.accompanist.placeholder)
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.3")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
|
||||
// TODO Move to common config
|
||||
ksp("com.airbnb.android:showkase-processor:1.0.0-beta14")
|
||||
testImplementation(libs.test.junit)
|
||||
androidTestImplementation(libs.test.junitext)
|
||||
ksp(libs.showkase.processor)
|
||||
}
|
||||
@@ -39,7 +39,10 @@ timber = "5.0.1"
|
||||
coil = "2.2.1"
|
||||
datetime = "0.4.0"
|
||||
wysiwyg = "0.7.0.1"
|
||||
serialization-json = "1.4.1"
|
||||
serialization_json = "1.4.1"
|
||||
showkase = "1.0.0-beta14"
|
||||
compose_destinations = "1.7.23-beta"
|
||||
jsoup = "1.15.3"
|
||||
|
||||
[libraries]
|
||||
# Project
|
||||
@@ -88,7 +91,11 @@ mavericks_compose = { module = "com.airbnb.android:mavericks-compose", version.r
|
||||
timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" }
|
||||
coil_compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
|
||||
datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "datetime" }
|
||||
serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization-json" }
|
||||
serialization_json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization_json" }
|
||||
compose_destinations = { module = "io.github.raamcosta.compose-destinations:animations-core", version.ref = "compose_destinations" }
|
||||
showkase = { module = "com.airbnb.android:showkase", version.ref = "showkase" }
|
||||
showkase_processor = { module = "com.airbnb.android:showkase-processor", version.ref = "showkase" }
|
||||
jsoup = { module = "org.jsoup:jsoup", version.ref = "jsoup" }
|
||||
|
||||
# Composer
|
||||
wysiwyg = { module = "io.element.android:wysiwyg", version.ref = "wysiwyg" }
|
||||
@@ -96,4 +103,7 @@ wysiwyg = { module = "io.element.android:wysiwyg", version.ref = "wysiwyg" }
|
||||
[bundles]
|
||||
|
||||
[plugins]
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||
android_application = { id = "com.android.application", version.ref = "android_gradle_plugin" }
|
||||
android_library = { id = "com.android.library", version.ref = "android_gradle_plugin" }
|
||||
kotlin_android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("io.element.android-compose")
|
||||
id("io.element.android-compose-library")
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
plugins {
|
||||
id("io.element.android-compose")
|
||||
// TODO Move to common config
|
||||
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
|
||||
id("io.element.android-compose-library")
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -9,9 +8,8 @@ android {
|
||||
|
||||
dependencies {
|
||||
// Should not be there, but this is a POC
|
||||
implementation("io.coil-kt:coil-compose:2.2.1")
|
||||
implementation(libs.coil.compose)
|
||||
implementation(libs.accompanist.systemui)
|
||||
// TODO Move to common config
|
||||
ksp("com.airbnb.android:showkase-processor:1.0.0-beta14")
|
||||
ksp(libs.showkase.processor)
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ dependencies {
|
||||
api(project(":libraries:rustSdk"))
|
||||
implementation(project(":libraries:core"))
|
||||
implementation(libs.timber)
|
||||
implementation("net.java.dev.jna:jna:5.10.0@aar")
|
||||
implementation("net.java.dev.jna:jna:5.12.1@aar")
|
||||
implementation(libs.coil.compose)
|
||||
implementation(libs.androidx.datastore.preferences)
|
||||
implementation(libs.serialization.json)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
plugins {
|
||||
id("io.element.android-compose")
|
||||
// TODO Move to common config
|
||||
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
|
||||
id("io.element.android-compose-library")
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -17,6 +16,5 @@ dependencies {
|
||||
implementation(libs.wysiwyg)
|
||||
implementation(libs.androidx.constraintlayout)
|
||||
implementation("com.google.android.material:material:1.7.0")
|
||||
// TODO Move to common config
|
||||
ksp("com.airbnb.android:showkase-processor:1.0.0-beta14")
|
||||
ksp(libs.showkase.processor)
|
||||
}
|
||||
|
||||
@@ -2,9 +2,7 @@ package extension
|
||||
|
||||
import Versions
|
||||
import com.android.build.api.dsl.CommonExtension
|
||||
import com.android.build.api.dsl.LibraryExtension
|
||||
import composeVersion
|
||||
import org.gradle.api.artifacts.VersionCatalog
|
||||
|
||||
|
||||
fun CommonExtension<*, *, *, *>.androidConfig() {
|
||||
defaultConfig {
|
||||
@@ -39,13 +37,3 @@ fun CommonExtension<*, *, *, *>.composeConfig() {
|
||||
}
|
||||
}
|
||||
|
||||
fun LibraryExtension.proguardConfig() {
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
isMinifyEnabled = true
|
||||
proguardFiles("proguard-android.txt", "proguard-rules.pro")
|
||||
consumerProguardFiles("proguard-rules.pro")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,23 +1,15 @@
|
||||
import extension.androidConfig
|
||||
import extension.composeConfig
|
||||
import extension.proguardConfig
|
||||
package extension
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("kotlin-android")
|
||||
// alias(libs.plugins.ksp)
|
||||
// id("com.google.devtools.ksp") // version "1.7.20-1.0.7"
|
||||
}
|
||||
import gradle.kotlin.dsl.accessors._4b7ad2363fc1fce7c774e054dc9a9300.androidTestImplementation
|
||||
import gradle.kotlin.dsl.accessors._4b7ad2363fc1fce7c774e054dc9a9300.debugImplementation
|
||||
import gradle.kotlin.dsl.accessors._4b7ad2363fc1fce7c774e054dc9a9300.implementation
|
||||
import org.gradle.kotlin.dsl.DependencyHandlerScope
|
||||
|
||||
android {
|
||||
androidConfig()
|
||||
proguardConfig()
|
||||
composeConfig()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(platform("androidx.compose:compose-bom:2022.11.00"))
|
||||
|
||||
fun DependencyHandlerScope.composeDependencies(){
|
||||
val composeBom = platform("androidx.compose:compose-bom:2022.11.00")
|
||||
implementation(composeBom)
|
||||
androidTestImplementation(composeBom)
|
||||
implementation("androidx.compose.ui:ui")
|
||||
implementation("androidx.compose.material:material")
|
||||
implementation("androidx.compose.material3:material3")
|
||||
@@ -29,7 +21,6 @@ dependencies {
|
||||
implementation("com.airbnb.android:mavericks-compose:3.0.1")
|
||||
debugImplementation("androidx.compose.ui:ui-tooling")
|
||||
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
||||
|
||||
implementation("com.airbnb.android:showkase:1.0.0-beta14")
|
||||
// ksp("com.airbnb.android:showkase-processor:1.0.0-beta14")
|
||||
}
|
||||
|
||||
9
plugins/src/main/java/extension/VersionCatalog.kt
Normal file
9
plugins/src/main/java/extension/VersionCatalog.kt
Normal file
@@ -0,0 +1,9 @@
|
||||
package extension
|
||||
|
||||
import org.gradle.api.artifacts.VersionCatalog
|
||||
|
||||
private fun VersionCatalog.getLibrary(library: String) = findLibrary(library).get()
|
||||
|
||||
private fun VersionCatalog.getBundle(bundle: String) = findBundle(bundle).get()
|
||||
|
||||
private fun VersionCatalog.getPlugin(plugin: String) = findPlugin(plugin).get()
|
||||
@@ -0,0 +1,17 @@
|
||||
import extension.androidConfig
|
||||
import extension.composeConfig
|
||||
import extension.composeDependencies
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
}
|
||||
|
||||
android {
|
||||
androidConfig()
|
||||
composeConfig()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
composeDependencies()
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import extension.androidConfig
|
||||
import extension.composeConfig
|
||||
import extension.composeDependencies
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("kotlin-android")
|
||||
}
|
||||
|
||||
|
||||
android {
|
||||
androidConfig()
|
||||
composeConfig()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
composeDependencies()
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import extension.androidConfig
|
||||
import extension.proguardConfig
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
@@ -8,5 +7,4 @@ plugins {
|
||||
|
||||
android {
|
||||
androidConfig()
|
||||
proguardConfig()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user