gradle: Handle kotlin in multiple parts of the build

This commit is contained in:
Ryan Pavlik 2020-11-12 17:18:25 -06:00 committed by Lubosz Sarnecki
parent fa840e1cd8
commit 885dd1d4d5
4 changed files with 19 additions and 1 deletions

View file

@ -12,6 +12,8 @@ buildscript {
androidxLifecycleVersion = "2.2.0"
androidxConstraintLayoutVersion = '2.0.4'
hiltVersion = "2.29.1-alpha"
// Saw some breakage when updating to 1.2?
materialVersion = "1.1.0"
}
@ -25,6 +27,8 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAboutLibsRelease}"
classpath 'com.quittle:svg-2-android-vector:0.0.5'
classpath "com.google.dagger:hilt-android-gradle-plugin:$hiltVersion"
}
}
plugins {

View file

@ -1,7 +1,10 @@
// Copyright 2020, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
id 'kotlin-android'
}
android {
compileSdkVersion project.sharedTargetSdk
@ -27,8 +30,13 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude("META-INF/*.kotlin_module")
}
}
dependencies {
implementation "androidx.annotation:annotation:$androidxAnnotationVersion"
implementation "androidx.core:core-ktx:$androidxCoreVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
}

View file

@ -39,6 +39,9 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude("META-INF/*.kotlin_module")
}
}
dependencies {

View file

@ -122,6 +122,9 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude("META-INF/*.kotlin_module")
}
}