build.gradle.kts
author Da Risk <da_risk@geekorum.com>
Thu, 22 Aug 2019 15:02:31 -0700
changeset 397 3881abcdd84c
parent 364 968f44db1e96
child 405 e27dd029b4ef
permissions -rw-r--r--
Update to kotlin-1.3.50
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
181
5ba798c38149 Add Missing license headers
Da Risk <da_risk@geekorum.com>
parents: 162
diff changeset
     1
/*
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     2
 * Geekttrss is a RSS feed reader application on the Android Platform.
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     3
 *
181
5ba798c38149 Add Missing license headers
Da Risk <da_risk@geekorum.com>
parents: 162
diff changeset
     4
 * Copyright (C) 2017-2019 by Frederic-Charles Barthelery.
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     5
 *
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     6
 * This file is part of Geekttrss.
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     7
 *
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     8
 * Geekttrss is free software: you can redistribute it and/or modify
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     9
 * it under the terms of the GNU General Public License as published by
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    10
 * the Free Software Foundation, either version 3 of the License, or
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    11
 * (at your option) any later version.
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    12
 *
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    13
 * Geekttrss is distributed in the hope that it will be useful,
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    16
 * GNU General Public License for more details.
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    17
 *
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    18
 * You should have received a copy of the GNU General Public License
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    19
 * along with Geekttrss.  If not, see <http://www.gnu.org/licenses/>.
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    20
 */
364
968f44db1e96 Configure Java version globally
Da Risk <da_risk@geekorum.com>
parents: 363
diff changeset
    21
import com.android.build.gradle.BaseExtension
968f44db1e96 Configure Java version globally
Da Risk <da_risk@geekorum.com>
parents: 363
diff changeset
    22
import com.geekorum.build.configureJavaVersion
161
a359009c33c3 Build: create version alignment platform for all projects
Da Risk <da_risk@geekorum.com>
parents: 147
diff changeset
    23
import com.geekorum.build.createComponentsPlatforms
101
247d5b1c0324 build: use dependencies version alignment and filter content of google()
Da Risk <da_risk@geekorum.com>
parents: 60
diff changeset
    24
import com.geekorum.build.setupGoogleContent
363
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    25
import org.jetbrains.kotlin.gradle.plugin.KaptExtension
280
1f5e9db3308e Update to kotlin 1.3.40
Da Risk <da_risk@geekorum.com>
parents: 233
diff changeset
    26
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    27
import java.net.URI
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    28
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    29
plugins {
228
00ff988c9fca build: update to AGP 3.4.1 and update oss-license-plugin
Da Risk <da_risk@geekorum.com>
parents: 181
diff changeset
    30
    id("com.google.android.gms.oss-licenses-plugin") version "0.9.5.1" apply false
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    31
    id("com.google.gms.google-services") version "3.2.0" apply false
318
2fbcca748f78 build: update fabric gradle plugin
Da Risk <da_risk@geekorum.com>
parents: 296
diff changeset
    32
    id("io.fabric") version "1.29.0" apply false
397
3881abcdd84c Update to kotlin-1.3.50
Da Risk <da_risk@geekorum.com>
parents: 364
diff changeset
    33
    kotlin("android") version "1.3.50" apply false
3881abcdd84c Update to kotlin-1.3.50
Da Risk <da_risk@geekorum.com>
parents: 364
diff changeset
    34
    kotlin("kapt") version "1.3.50" apply false
3881abcdd84c Update to kotlin-1.3.50
Da Risk <da_risk@geekorum.com>
parents: 364
diff changeset
    35
    id("kotlinx-serialization") version "1.3.50" apply false
332
40e435d80c0c build: add navigation safe args plugin
Da Risk <da_risk@geekorum.com>
parents: 318
diff changeset
    36
    id("androidx.navigation.safeargs.kotlin") version "2.1.0-alpha06" apply false
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    37
}
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    38
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    39
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    40
// some extra properties
233
f105a3e36288 Update to compileSdk 29 (q)
Da Risk <da_risk@geekorum.com>
parents: 228
diff changeset
    41
extra["compileSdkVersion"] = "android-29"
363
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    42
extra["daggerVersion"] = "2.24"
162
f627eceb01b2 Update appcompat and lifecycle
Da Risk <da_risk@geekorum.com>
parents: 161
diff changeset
    43
extra["lifecycleVersion"] = "2.2.0-alpha01"
341
69f8a57d4685 Update coroutines to 1.3.0-M2
Da Risk <da_risk@geekorum.com>
parents: 332
diff changeset
    44
extra["coroutinesVersion"] = "1.3.0-M2"
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    45
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    46
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    47
allprojects {
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    48
    repositories {
101
247d5b1c0324 build: use dependencies version alignment and filter content of google()
Da Risk <da_risk@geekorum.com>
parents: 60
diff changeset
    49
        google().setupGoogleContent()
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    50
        jcenter()
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    51
        // for kotlinx
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    52
        maven { url = URI("https://kotlin.bintray.com/kotlinx") }
161
a359009c33c3 Build: create version alignment platform for all projects
Da Risk <da_risk@geekorum.com>
parents: 147
diff changeset
    53
        // for geekdroid
a359009c33c3 Build: create version alignment platform for all projects
Da Risk <da_risk@geekorum.com>
parents: 147
diff changeset
    54
        flatDir {
a359009c33c3 Build: create version alignment platform for all projects
Da Risk <da_risk@geekorum.com>
parents: 147
diff changeset
    55
            dirs(rootProject.files("libs"))
a359009c33c3 Build: create version alignment platform for all projects
Da Risk <da_risk@geekorum.com>
parents: 147
diff changeset
    56
        }
a359009c33c3 Build: create version alignment platform for all projects
Da Risk <da_risk@geekorum.com>
parents: 147
diff changeset
    57
    }
a359009c33c3 Build: create version alignment platform for all projects
Da Risk <da_risk@geekorum.com>
parents: 147
diff changeset
    58
    dependencies {
a359009c33c3 Build: create version alignment platform for all projects
Da Risk <da_risk@geekorum.com>
parents: 147
diff changeset
    59
        createComponentsPlatforms()
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    60
    }
280
1f5e9db3308e Update to kotlin 1.3.40
Da Risk <da_risk@geekorum.com>
parents: 233
diff changeset
    61
1f5e9db3308e Update to kotlin 1.3.40
Da Risk <da_risk@geekorum.com>
parents: 233
diff changeset
    62
    tasks.withType<KotlinCompile> {
342
10640a083343 OnDemandModuleManager: use flow instead of channel when applicable
Da Risk <da_risk@geekorum.com>
parents: 341
diff changeset
    63
        kotlinOptions {
10640a083343 OnDemandModuleManager: use flow instead of channel when applicable
Da Risk <da_risk@geekorum.com>
parents: 341
diff changeset
    64
            jvmTarget = "1.8"
10640a083343 OnDemandModuleManager: use flow instead of channel when applicable
Da Risk <da_risk@geekorum.com>
parents: 341
diff changeset
    65
            this.freeCompilerArgs = listOf("-Xuse-experimental=kotlin.Experimental")
10640a083343 OnDemandModuleManager: use flow instead of channel when applicable
Da Risk <da_risk@geekorum.com>
parents: 341
diff changeset
    66
        }
280
1f5e9db3308e Update to kotlin 1.3.40
Da Risk <da_risk@geekorum.com>
parents: 233
diff changeset
    67
    }
363
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    68
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    69
    afterEvaluate {
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    70
        extensions.findByType<KaptExtension>()?.arguments {
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    71
            arg("dagger.formatGeneratedSource", "enabled")
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    72
        }
364
968f44db1e96 Configure Java version globally
Da Risk <da_risk@geekorum.com>
parents: 363
diff changeset
    73
        extensions.findByType<BaseExtension>()?.apply {
968f44db1e96 Configure Java version globally
Da Risk <da_risk@geekorum.com>
parents: 363
diff changeset
    74
            configureJavaVersion()
968f44db1e96 Configure Java version globally
Da Risk <da_risk@geekorum.com>
parents: 363
diff changeset
    75
        }
363
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    76
    }
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    77
}
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    78
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    79
tasks.register("clean", Delete::class.java) {
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    80
    delete(buildDir)
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    81
}