Merge develop into feature/fga/dagger_setup
This commit is contained in:
@@ -11,7 +11,7 @@ object Versions {
|
||||
|
||||
const val compileSdk = 33
|
||||
const val targetSdk = 33
|
||||
const val minSdk = 24
|
||||
const val minSdk = 21
|
||||
val javaCompileVersion = JavaVersion.VERSION_11
|
||||
val javaLanguageVersion: JavaLanguageVersion = JavaLanguageVersion.of(11)
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@ package extension
|
||||
|
||||
import Versions
|
||||
import com.android.build.api.dsl.CommonExtension
|
||||
import org.gradle.api.Project
|
||||
import java.io.File
|
||||
|
||||
|
||||
fun CommonExtension<*, *, *, *>.androidConfig() {
|
||||
fun CommonExtension<*, *, *, *>.androidConfig(project: Project) {
|
||||
defaultConfig {
|
||||
compileSdk = Versions.compileSdk
|
||||
minSdk = Versions.minSdk
|
||||
@@ -18,6 +19,12 @@ fun CommonExtension<*, *, *, *>.androidConfig() {
|
||||
testOptions {
|
||||
unitTests.isReturnDefaultValues = true
|
||||
}
|
||||
|
||||
lint {
|
||||
lintConfig = File("${project.rootDir}/tools/lint/lint.xml")
|
||||
checkDependencies = true
|
||||
abortOnError = true
|
||||
}
|
||||
}
|
||||
|
||||
fun CommonExtension<*, *, *, *>.composeConfig() {
|
||||
@@ -35,5 +42,11 @@ fun CommonExtension<*, *, *, *>.composeConfig() {
|
||||
add("META-INF/LGPL2.1")
|
||||
}
|
||||
}
|
||||
|
||||
lint {
|
||||
// Extra rules for compose
|
||||
error.add("ComposableLambdaParameterNaming")
|
||||
error.add("ComposableLambdaParameterPosition")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,17 @@ import gradle.kotlin.dsl.accessors._4b7ad2363fc1fce7c774e054dc9a9300.debugImplem
|
||||
import gradle.kotlin.dsl.accessors._4b7ad2363fc1fce7c774e054dc9a9300.implementation
|
||||
import org.gradle.kotlin.dsl.DependencyHandlerScope
|
||||
|
||||
/**
|
||||
* Dependencies used by all the modules
|
||||
*/
|
||||
fun DependencyHandlerScope.commonDependencies() {
|
||||
implementation("com.jakewharton.timber:timber:5.0.1")
|
||||
}
|
||||
|
||||
fun DependencyHandlerScope.composeDependencies(){
|
||||
/**
|
||||
* Dependencies used by all the modules with composable items
|
||||
*/
|
||||
fun DependencyHandlerScope.composeDependencies() {
|
||||
val composeBom = platform("androidx.compose:compose-bom:2022.11.00")
|
||||
implementation(composeBom)
|
||||
androidTestImplementation(composeBom)
|
||||
@@ -22,5 +31,6 @@ fun DependencyHandlerScope.composeDependencies(){
|
||||
debugImplementation("androidx.compose.ui:ui-tooling")
|
||||
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
||||
implementation("com.airbnb.android:showkase:1.0.0-beta14")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.5")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/**
|
||||
* This will generate the plugin "io.element.android-compose-application", used only in the module `app`.
|
||||
*/
|
||||
import extension.androidConfig
|
||||
import extension.commonDependencies
|
||||
import extension.composeConfig
|
||||
import extension.composeDependencies
|
||||
|
||||
@@ -8,10 +12,11 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
androidConfig()
|
||||
androidConfig(project)
|
||||
composeConfig()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
commonDependencies()
|
||||
composeDependencies()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/**
|
||||
* This will generate the plugin "io.element.android-compose-library", used in android library with compose modules.
|
||||
*/
|
||||
import extension.androidConfig
|
||||
import extension.commonDependencies
|
||||
import extension.composeConfig
|
||||
import extension.composeDependencies
|
||||
|
||||
@@ -7,12 +11,12 @@ plugins {
|
||||
id("kotlin-android")
|
||||
}
|
||||
|
||||
|
||||
android {
|
||||
androidConfig()
|
||||
androidConfig(project)
|
||||
composeConfig()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
commonDependencies()
|
||||
composeDependencies()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/**
|
||||
* This will generate the plugin "io.element.android-library", used in android library without compose modules.
|
||||
*/
|
||||
import extension.androidConfig
|
||||
import extension.commonDependencies
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
@@ -6,5 +10,9 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
androidConfig()
|
||||
androidConfig(project)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
commonDependencies()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user