ui/common/build.gradle.kts
changeset 7 b3b2e88f441f
parent 6 67743d62eda9
child 12 dc48b76fbeb8
equal deleted inserted replaced
6:67743d62eda9 7:b3b2e88f441f
     1 plugins {
     1 plugins {
     2     id("com.android.library")
     2     id("com.android.library")
     3     kotlin("android")
     3     kotlin("android")
     4     id("com.geekorum.build.source-license-checker")
     4     id("com.geekorum.build.source-license-checker")
       
     5     `maven-publish`
     5 }
     6 }
       
     7 
       
     8 group = "com.geekorum.aboutoss"
       
     9 version = "0.0.1"
     6 
    10 
     7 android {
    11 android {
     8     namespace = "com.geekorum.aboutoss.ui.common"
    12     namespace = "com.geekorum.aboutoss.ui.common"
     9     compileSdk = 33
    13     compileSdk = 33
    10 
    14 
    11     defaultConfig {
    15     defaultConfig {
    12         minSdk = 24
    16         minSdk = 24
    13 
    17 
    14         testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    18         testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    15         consumerProguardFiles("consumer-rules.pro")
    19         consumerProguardFiles("consumer-rules.pro")
       
    20 
       
    21         aarMetadata {
       
    22             minCompileSdk = 24
       
    23         }
       
    24 
    16     }
    25     }
    17 
    26 
    18     buildTypes {
    27     buildTypes {
    19         release {
    28         release {
    20             isMinifyEnabled = false
    29             isMinifyEnabled = false
    29         targetCompatibility = JavaVersion.VERSION_1_8
    38         targetCompatibility = JavaVersion.VERSION_1_8
    30     }
    39     }
    31     kotlinOptions {
    40     kotlinOptions {
    32         jvmTarget = "1.8"
    41         jvmTarget = "1.8"
    33     }
    42     }
       
    43 
       
    44     publishing {
       
    45         singleVariant("release") {
       
    46             withJavadocJar()
       
    47             withSourcesJar()
       
    48         }
       
    49     }
    34 }
    50 }
    35 
    51 
    36 dependencies {
    52 dependencies {
    37     implementation(project(":core"))
    53     implementation(project(":core"))
    38     api(libs.appcompat)
    54     api(libs.appcompat)
    41     implementation(libs.geekdroid) {
    57     implementation(libs.geekdroid) {
    42         //TODO get rid of dagger platform in geekdroid
    58         //TODO get rid of dagger platform in geekdroid
    43         exclude("com.google.dagger", "dagger-platform")
    59         exclude("com.google.dagger", "dagger-platform")
    44     }
    60     }
    45 
    61 
    46 
       
    47     testImplementation(libs.junit)
    62     testImplementation(libs.junit)
    48     androidTestImplementation(libs.androidx.test.ext.junit)
    63     androidTestImplementation(libs.androidx.test.ext.junit)
    49     androidTestImplementation(libs.espresso.core)
    64     androidTestImplementation(libs.espresso.core)
    50 }
    65 }
       
    66 
       
    67 publishing {
       
    68     publications {
       
    69         val pomConfiguration: (MavenPom).() -> Unit = {
       
    70             name.set("ui-common")
       
    71             description.set("A library to retrieve and display opensource licenses in Android applications")
       
    72             licenses {
       
    73                 license {
       
    74                     name.set("GPL-3.0-or-later")
       
    75                     url.set("https://www.gnu.org/licenses/gpl-3.0.html")
       
    76                     distribution.set("repo")
       
    77                 }
       
    78             }
       
    79             inceptionYear.set("2023")
       
    80         }
       
    81 
       
    82         register<MavenPublication>("release") {
       
    83             afterEvaluate {
       
    84                 from(components["release"])
       
    85             }
       
    86             artifactId = "ui-common"
       
    87             pom(pomConfiguration)
       
    88         }
       
    89     }
       
    90 }