Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

Now a Kotlin JVM library instead of an Android library

parent f2078bc8
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
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:

build.gradle

deleted100644 → 0
+0 −69
Original line number Diff line number Diff line

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
}

build.gradle.kts

0 → 100644
+31 −0
Original line number Diff line number Diff line

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)
    })
}
+1 −1
Original line number Diff line number Diff line
@@ -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
Loading