ui/common/build.gradle.kts
changeset 36 a8cfcfe9a6ed
parent 34 ce299aacc068
child 37 ff77c11da594
equal deleted inserted replaced
35:4ca4a17fe9f7 36:a8cfcfe9a6ed
    17  * GNU General Public License for more details.
    17  * GNU General Public License for more details.
    18  *
    18  *
    19  * You should have received a copy of the GNU General Public License
    19  * You should have received a copy of the GNU General Public License
    20  * along with AboutOss.  If not, see <http://www.gnu.org/licenses/>.
    20  * along with AboutOss.  If not, see <http://www.gnu.org/licenses/>.
    21  */
    21  */
       
    22 import org.jetbrains.kotlin.gradle.dsl.JvmTarget
       
    23 
    22 plugins {
    24 plugins {
    23     id("com.android.library")
    25     id("com.android.library")
    24     kotlin("android")
    26     kotlin("multiplatform")
    25     id("com.geekorum.build.source-license-checker")
    27     id("com.geekorum.build.source-license-checker")
    26     `maven-publish`
    28     `maven-publish`
    27 }
    29 }
    28 
    30 
    29 group = "com.geekorum.aboutoss"
    31 group = "com.geekorum.aboutoss"
    30 version = "0.1.0"
    32 version = "0.1.0"
       
    33 
       
    34 kotlin {
       
    35     androidTarget {
       
    36         compilerOptions {
       
    37             jvmTarget.set(JvmTarget.JVM_17)
       
    38         }
       
    39     }
       
    40 
       
    41     jvm("desktop")
       
    42 
       
    43     listOf(
       
    44         iosX64(),
       
    45         iosArm64(),
       
    46         iosSimulatorArm64(),
       
    47     ).forEach { iosTarget ->
       
    48         iosTarget.binaries.framework {
       
    49             baseName = "aboutoss-core"
       
    50             isStatic = true
       
    51         }
       
    52     }
       
    53 
       
    54     sourceSets {
       
    55         commonMain.dependencies {
       
    56             implementation(project(":core"))
       
    57             api(libs.org.jetbrains.androidx.lifecycle.viewmodel)
       
    58         }
       
    59 
       
    60         androidMain.dependencies {
       
    61             api(libs.androidx.activity)
       
    62             api(libs.geekdroid)
       
    63         }
       
    64     }
       
    65 }
    31 
    66 
    32 android {
    67 android {
    33     namespace = "com.geekorum.aboutoss.ui.common"
    68     namespace = "com.geekorum.aboutoss.ui.common"
    34     compileSdk = 35
    69     compileSdk = 35
    35 
    70 
    53                 "proguard-rules.pro"
    88                 "proguard-rules.pro"
    54             )
    89             )
    55         }
    90         }
    56     }
    91     }
    57     compileOptions {
    92     compileOptions {
    58         sourceCompatibility = JavaVersion.VERSION_1_8
    93         sourceCompatibility = JavaVersion.VERSION_17
    59         targetCompatibility = JavaVersion.VERSION_1_8
    94         targetCompatibility = JavaVersion.VERSION_17
    60     }
       
    61     kotlinOptions {
       
    62         jvmTarget = "1.8"
       
    63     }
    95     }
    64 
    96 
    65     publishing {
    97     publishing {
    66         singleVariant("release") {
    98         singleVariant("release") {
    67             withJavadocJar()
    99             withJavadocJar()
    69         }
   101         }
    70     }
   102     }
    71 }
   103 }
    72 
   104 
    73 dependencies {
   105 dependencies {
    74     implementation(project(":core"))
       
    75     api(libs.appcompat)
       
    76     implementation(libs.androidx.lifecycle.viewmodel)
       
    77     implementation(libs.androidx.activity)
       
    78     api(libs.geekdroid) {
       
    79         //TODO get rid of dagger platform in geekdroid
       
    80         exclude("com.google.dagger", "dagger-platform")
       
    81     }
       
    82 
       
    83     testImplementation(libs.junit)
   106     testImplementation(libs.junit)
    84     androidTestImplementation(libs.androidx.test.ext.junit)
   107     androidTestImplementation(libs.androidx.test.ext.junit)
    85     androidTestImplementation(libs.espresso.core)
   108     androidTestImplementation(libs.espresso.core)
    86 }
   109 }
    87 
   110