Commit 719ad1d3 authored by Ricki Hirner's avatar Ricki Hirner

Now a Kotlin JVM library instead of an Android library

parent f2078bc8
Pipeline #42297005 passed with stages
in 4 minutes and 46 seconds
image: registry.gitlab.com/bitfireat/davdroid:latest
image: openjdk:latest
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle; chmod +x gradlew
......@@ -12,7 +12,6 @@ test:
- ./gradlew check
artifacts:
paths:
- build/outputs/lint-results-debug.html
- build/reports/
pages:
......
buildscript {
ext.kotlin_version = '1.3.11'
ext.dokka_version = '0.9.17'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:${dokka_version}"
}
}
repositories {
jcenter()
google()
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'org.jetbrains.dokka-android'
ext {
okhttp_version = '3.12.1'
}
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
buildConfigField "String", "version_okhttp", "\"$okhttp_version\""
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
disable 'AllowBackup'
}
defaultConfig {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
api "com.squareup.okhttp3:okhttp:$okhttp_version"
androidTestImplementation "com.squareup.okhttp3:mockwebserver:$okhttp_version"
androidTestImplementation 'androidx.test:runner:1.1.1'
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testImplementation 'junit:junit:4.12'
testImplementation "com.squareup.okhttp3:mockwebserver:$okhttp_version"
testImplementation 'org.ogce:xpp3:1.1.6' // XmlPullParser
}
object Libs {
const val okhttpVersion = "3.12.1"
const val xpp3Version = "1.1.6"
}
plugins {
kotlin("jvm") version "1.3.11"
id("com.github.kukuhyoniatmoko.buildconfigkotlin") version "1.0.5"
id("org.jetbrains.dokka") version "0.9.17"
}
repositories {
jcenter()
}
dependencies {
implementation(kotlin("stdlib"))
api("com.squareup.okhttp3:okhttp:${Libs.okhttpVersion}")
implementation("org.ogce:xpp3:${Libs.xpp3Version}") // XmlPullParser
testImplementation("com.squareup.okhttp3:mockwebserver:${Libs.okhttpVersion}")
}
buildConfigKotlin {
sourceSet("main", Action {
buildConfig(name = "okhttpVersion", value = Libs.okhttpVersion)
})
}
......@@ -11,4 +11,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1-all.zip
......@@ -12,6 +12,6 @@ object Constants {
var log = Logger.getLogger("dav4android")!!
const val okHttpVersion = BuildConfig.version_okhttp
const val okhttpVersion = BuildConfig.okhttpVersion
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment