83 lines
2.1 KiB
Groovy
83 lines
2.1 KiB
Groovy
plugins {
|
|
id 'com.android.library'
|
|
id 'kotlin-android'
|
|
id 'org.jetbrains.dokka'
|
|
}
|
|
|
|
android {
|
|
compileSdk 31
|
|
|
|
defaultConfig {
|
|
minSdk 21
|
|
targetSdk 31
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
consumerProguardFiles "consumer-rules.pro"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = '1.8'
|
|
useIR = true
|
|
}
|
|
|
|
buildFeatures {
|
|
buildConfig false
|
|
compose true
|
|
}
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion composeVersion
|
|
}
|
|
|
|
packagingOptions {
|
|
resources {
|
|
excludes += '/META-INF/{AL2.0,LGPL2.1}'
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// Kotlin Coroutines
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
|
|
|
|
// Android core
|
|
implementation "androidx.core:core-ktx:$androidCoreVersion"
|
|
|
|
// Jetpack Compose
|
|
implementation "androidx.compose.ui:ui:$composeVersion"
|
|
implementation "androidx.compose.runtime:runtime:$composeVersion"
|
|
|
|
// Testing
|
|
testImplementation "junit:junit:$jUnitVersion"
|
|
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion"
|
|
androidTestImplementation "androidx.test.ext:junit:$androidJUnitTestVersion"
|
|
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$composeVersion"
|
|
androidTestImplementation "androidx.compose.ui:ui-test-manifest:$composeVersion"
|
|
|
|
// For using UI components in test
|
|
androidTestImplementation "androidx.compose.material:material:$composeVersion"
|
|
}
|
|
|
|
dokkaHtml.configure {
|
|
outputDirectory.set(rootProject.mkdir("docs"))
|
|
|
|
dokkaSourceSets {
|
|
named("main") {
|
|
noAndroidSdkLink.set(false)
|
|
}
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.vanniktech.maven.publish' |