ui/material2/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.material"
    12     namespace = "com.geekorum.aboutoss.ui.material"
     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         }
    16     }
    24     }
    17 
    25 
    18     buildTypes {
    26     buildTypes {
    19         release {
    27         release {
    20             isMinifyEnabled = false
    28             isMinifyEnabled = false
    37     }
    45     }
    38 
    46 
    39     composeOptions {
    47     composeOptions {
    40         kotlinCompilerExtensionVersion = libs.versions.androidx.compose.compiler.get()
    48         kotlinCompilerExtensionVersion = libs.versions.androidx.compose.compiler.get()
    41     }
    49     }
       
    50 
       
    51     publishing {
       
    52         singleVariant("release") {
       
    53             withJavadocJar()
       
    54             withSourcesJar()
       
    55         }
       
    56     }
    42 }
    57 }
    43 
    58 
    44 dependencies {
    59 dependencies {
    45     implementation(project(":ui:common"))
    60     implementation(project(":ui:common"))
    46     implementation(platform(libs.androidx.compose.bom))
    61     implementation(platform(libs.androidx.compose.bom))
    50 
    65 
    51     testImplementation(libs.junit)
    66     testImplementation(libs.junit)
    52     androidTestImplementation(libs.androidx.test.ext.junit)
    67     androidTestImplementation(libs.androidx.test.ext.junit)
    53     androidTestImplementation(libs.espresso.core)
    68     androidTestImplementation(libs.espresso.core)
    54 }
    69 }
       
    70 
       
    71 publishing {
       
    72     publications {
       
    73         val pomConfiguration: (MavenPom).() -> Unit = {
       
    74             name.set("ui-material")
       
    75             description.set("A library to retrieve and display opensource licenses in Android applications")
       
    76             licenses {
       
    77                 license {
       
    78                     name.set("GPL-3.0-or-later")
       
    79                     url.set("https://www.gnu.org/licenses/gpl-3.0.html")
       
    80                     distribution.set("repo")
       
    81                 }
       
    82             }
       
    83             inceptionYear.set("2023")
       
    84         }
       
    85 
       
    86         register<MavenPublication>("release") {
       
    87             afterEvaluate {
       
    88                 from(components["release"])
       
    89             }
       
    90             artifactId = "ui-material"
       
    91             pom(pomConfiguration)
       
    92         }
       
    93     }
       
    94 }