Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build.gradle - github.com/bitfireAT/ical4android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7b60d2e3b5a156db7aaf272379c17262d916d3f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/***************************************************************************************************
 * Copyright © All Contributors. See LICENSE and AUTHORS in the root directory for details.
 **************************************************************************************************/

buildscript {
    ext.versions = [
        kotlin: '1.7.20',
        dokka: '1.7.20',
        ical4j: '3.2.5',
        // latest Apache Commons versions that don't require Java 8 (Android 7)
        commonsIO: '2.6'
    ]

    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
        classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
    }
}

repositories {
    google()
    mavenCentral()
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'org.jetbrains.dokka'

android {
    compileSdkVersion 33
    buildToolsVersion '33.0.0'

    defaultConfig {
        minSdkVersion 21        // Android 5.0
        targetSdkVersion 32     // Android 12

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        buildConfigField "String", "version_ical4j", "\"${versions.ical4j}\""
    }

    namespace 'at.bitfire.ical4android'

    compileOptions {
        // ical4j >= 3.x uses the Java 8 Time API
        coreLibraryDesugaringEnabled true

        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }
    packagingOptions {
        resources {
            excludes += ['META-INF/DEPENDENCIES', 'META-INF/LICENSE', 'META-INF/*.md']
        }
    }
    lint {
        disable 'AllowBackup', 'InvalidPackage'
    }

    sourceSets {
        main.java.srcDirs = [ "src/main/java", "opentasks-contract/src/main/java" ]
    }
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6'    // 2.0.0 produces "Unsupported desugared library configuration version, please upgrade the D8/R8 compiler."

    api("org.mnode.ical4j:ical4j:${versions.ical4j}") {
        // exclude modules which are in conflict with system libraries
        exclude group: 'commons-logging'
        exclude group: 'org.json', module: 'json'
        // exclude groovy because we don't need it
        exclude group: 'org.codehaus.groovy', module: 'groovy'
        exclude group: 'org.codehaus.groovy', module: 'groovy-dateutil'
    }
    // ical4j requires newer Apache Commons libraries, which require Java8. Force latest Java7 versions.
    // noinspection GradleDependency
    api("org.apache.commons:commons-collections4:4.2") { force = true }
    // noinspection GradleDependency
    api("org.apache.commons:commons-lang3:3.8.1") { force = true }

    // noinspection GradleDependency
    implementation "commons-io:commons-io:${versions.commonsIO}"

    implementation 'org.slf4j:slf4j-jdk14:2.0.3'
    implementation 'androidx.core:core-ktx:1.9.0'

    androidTestImplementation 'androidx.test:core:1.4.0'
    androidTestImplementation 'androidx.test:runner:1.4.0'
    androidTestImplementation 'androidx.test:rules:1.4.0'
    testImplementation 'junit:junit:4.13.2'
}