geekdroid-firebase/build.gradle.kts
changeset 32 f165a9538ee3
parent 26 3650f8c57a61
child 35 626c1ea36cb9
equal deleted inserted replaced
31:0e233781410b 32:f165a9538ee3
     5     kotlin("android")
     5     kotlin("android")
     6     id("com.geekorum.build.android-tests")
     6     id("com.geekorum.build.android-tests")
     7     id("com.geekorum.build.android-avdl")
     7     id("com.geekorum.build.android-avdl")
     8     `maven-publish`
     8     `maven-publish`
     9 }
     9 }
    10 
       
    11 val archivesBaseName by extra("geekdroid-firebase")
       
    12 val artifactId by extra (archivesBaseName)
       
    13 
    10 
    14 android {
    11 android {
    15     val compileSdkInt: Int by rootProject.extra
    12     val compileSdkInt: Int by rootProject.extra
    16     compileSdk = compileSdkInt
    13     compileSdk = compileSdkInt
    17     namespace = "com.geekorum.geekdroid.firebase"
    14     namespace = "com.geekorum.geekdroid.firebase"
    31 
    28 
    32     lint {
    29     lint {
    33         abortOnError = false
    30         abortOnError = false
    34     }
    31     }
    35 
    32 
       
    33     publishing {
       
    34         singleVariant("release") {
       
    35             withSourcesJar()
       
    36         }
       
    37         singleVariant("debug") {
       
    38             withSourcesJar()
       
    39         }
       
    40     }
       
    41 
    36 }
    42 }
    37 
    43 
    38 dependencies {
    44 dependencies {
    39     implementation(enforcedPlatform(kotlin("bom")))
    45     implementation(platform(kotlin("bom")))
    40     implementation(kotlin("stdlib-jdk8"))
    46     implementation(kotlin("stdlib-jdk8"))
    41 
    47 
    42     implementation(enforcedPlatform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4"))
    48     implementation(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4"))
    43     api("org.jetbrains.kotlinx:kotlinx-coroutines-core")
    49     api("org.jetbrains.kotlinx:kotlinx-coroutines-core")
    44     api("org.jetbrains.kotlinx:kotlinx-coroutines-play-services")
    50     api("org.jetbrains.kotlinx:kotlinx-coroutines-play-services")
    45 
    51 
    46     implementation("com.jakewharton.timber:timber:5.0.1")
    52     implementation("com.jakewharton.timber:timber:5.0.1")
    47 
    53 
    63     implementation("com.google.guava:guava:27.0.1-android")
    69     implementation("com.google.guava:guava:27.0.1-android")
    64 }
    70 }
    65 
    71 
    66 apply {
    72 apply {
    67     from("$projectDir/../config/source-archive.gradle")
    73     from("$projectDir/../config/source-archive.gradle")
    68     from("$projectDir/../config/android-maven-publication.gradle")
       
    69 }
    74 }
       
    75 
       
    76 publishing {
       
    77     publications {
       
    78         val pomConfiguration: (MavenPom).() -> Unit = {
       
    79             name.set("Geekdroid-Firebase")
       
    80             description.set("An Android library used in various Android projects. ")
       
    81             licenses {
       
    82                 license {
       
    83                     name.set("GPL-3.0-or-later")
       
    84                     url.set("https://www.gnu.org/licenses/gpl-3.0.html")
       
    85                     distribution.set("repo")
       
    86                 }
       
    87             }
       
    88             inceptionYear.set("2017")
       
    89         }
       
    90 
       
    91         register<MavenPublication>("release") {
       
    92             afterEvaluate {
       
    93                 from(components["release"])
       
    94             }
       
    95             artifactId = "geekdroid-firebase"
       
    96             pom(pomConfiguration)
       
    97         }
       
    98 
       
    99         register<MavenPublication>("debugSnapshot") {
       
   100             afterEvaluate {
       
   101                 from(components["debug"])
       
   102             }
       
   103             artifactId = "geekdroid-firebase"
       
   104             version = "$version-SNAPSHOT"
       
   105             pom(pomConfiguration)
       
   106 
       
   107         }
       
   108     }
       
   109 }