UnifiedNlp/ui/build.gradle
2020-07-10 19:13:13 +02:00

127 lines
4 KiB
Groovy

/*
* SPDX-FileCopyrightText: 2019, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'maven-publish'
apply plugin: 'signing'
android {
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
dataBinding {
enabled = true
}
defaultConfig {
versionName version
minSdkVersion Math.max(androidMinSdk, 14)
targetSdkVersion androidTargetSdk
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
apply from: "../gradle/androidJars.gradle"
dependencies {
implementation project(':api')
implementation project(':client')
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
// AndroidX UI
implementation "androidx.appcompat:appcompat:$appcompatVersion"
implementation "androidx.fragment:fragment:$fragmentVersion"
implementation "androidx.recyclerview:recyclerview:$recyclerviewVersion"
// Kotlin coroutine for android
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion"
// Activity result
implementation "androidx.activity:activity:1.1.0"
implementation "androidx.activity:activity-ktx:1.1.0"
// Navigation
implementation "androidx.navigation:navigation-fragment:$navigationVersion"
implementation "androidx.navigation:navigation-ui:$navigationVersion"
implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
pom {
name = 'UnifiedNlp UI'
description = 'UnifiedNlp UI library for common configuration fragments'
url = 'https://github.com/microg/UnifiedNlp'
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'microg'
name = 'microG Team'
}
developer {
id = 'mar-v-in'
name = 'Marvin W.'
}
}
scm {
url = 'https://github.com/microg/UnifiedNlp'
connection = 'scm:git:https://github.com/microg/UnifiedNlp.git'
developerConnection = 'scm:git:ssh://github.com/microg/UnifiedNlp.git'
}
}
from components.release
artifact androidSourcesJar
artifact androidJavadocsJar
}
}
if (project.hasProperty('sonatype.username')) {
repositories {
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username project.getProperty('sonatype.username')
password project.getProperty('sonatype.password')
}
}
}
}
}
if (project.hasProperty('signing.keyId')) {
signing {
sign publishing.publications
}
}
}