build.gradle.kts
author Da Risk <da_risk@geekorum.com>
Thu, 27 Apr 2023 22:45:22 -0400
changeset 1019 57b5ce68376f
parent 1013 18d820f292d6
child 1020 35d86e87cd75
permissions -rw-r--r--
build: still use agp dependency in buildSrc
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
 *
943
298742859784 build: update license headers
Da Risk <da_risk@geekorum.com>
parents: 941
diff changeset
     4
 * Copyright (C) 2017-2023 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
 */
1013
18d820f292d6 build: rework buildSrc to use agp-api
Da Risk <da_risk@geekorum.com>
parents: 944
diff changeset
    21
import com.android.build.api.dsl.CommonExtension
18d820f292d6 build: rework buildSrc to use agp-api
Da Risk <da_risk@geekorum.com>
parents: 944
diff changeset
    22
import com.geekorum.build.*
363
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    23
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
    24
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    25
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    26
plugins {
1019
57b5ce68376f build: still use agp dependency in buildSrc
Da Risk <da_risk@geekorum.com>
parents: 1013
diff changeset
    27
//    alias(libs.plugins.android.application) apply false
57b5ce68376f build: still use agp dependency in buildSrc
Da Risk <da_risk@geekorum.com>
parents: 1013
diff changeset
    28
//    alias(libs.plugins.android.dynamic.feature) apply false
1013
18d820f292d6 build: rework buildSrc to use agp-api
Da Risk <da_risk@geekorum.com>
parents: 944
diff changeset
    29
    alias(libs.plugins.kotlin.android) apply false
18d820f292d6 build: rework buildSrc to use agp-api
Da Risk <da_risk@geekorum.com>
parents: 944
diff changeset
    30
    alias(libs.plugins.kotlin.jvm) apply false
18d820f292d6 build: rework buildSrc to use agp-api
Da Risk <da_risk@geekorum.com>
parents: 944
diff changeset
    31
    alias(libs.plugins.kotlin.kapt) apply false
566
5f481ad9fcc6 Update to gradle-6.0.1
Da Risk <da_risk@geekorum.com>
parents: 562
diff changeset
    32
    // these should not be needed but for an unknown reason they get applied
5f481ad9fcc6 Update to gradle-6.0.1
Da Risk <da_risk@geekorum.com>
parents: 562
diff changeset
    33
    // with bad ordering if not there. or they can't be applied dynamically
5f481ad9fcc6 Update to gradle-6.0.1
Da Risk <da_risk@geekorum.com>
parents: 562
diff changeset
    34
    // version used is in gradle.properties
941
dd7a7a2adb1c build: move dependencies to version catalog
Da Risk <da_risk@geekorum.com>
parents: 918
diff changeset
    35
    alias(libs.plugins.firebase.crashlytics) apply false
dd7a7a2adb1c build: move dependencies to version catalog
Da Risk <da_risk@geekorum.com>
parents: 918
diff changeset
    36
    alias(libs.plugins.google.gms.google.services) 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
// some extra properties
892
ef6566a3303b build: update a bunch of dependencies
Da Risk <da_risk@geekorum.com>
parents: 891
diff changeset
    40
extra["compileSdkInt"] = 33
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    41
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    42
allprojects {
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    43
    repositories {
101
247d5b1c0324 build: use dependencies version alignment and filter content of google()
Da Risk <da_risk@geekorum.com>
parents: 60
diff changeset
    44
        google().setupGoogleContent()
809
a1586e51358d build: remove jcenter() use mavenCentral()
Da Risk <da_risk@geekorum.com>
parents: 765
diff changeset
    45
        mavenCentral()
161
a359009c33c3 Build: create version alignment platform for all projects
Da Risk <da_risk@geekorum.com>
parents: 147
diff changeset
    46
        // for geekdroid
670
1e81fe121832 Use geekdroid from jitpack instead of prebuilt library
Da Risk <da_risk@geekorum.com>
parents: 611
diff changeset
    47
        maven {
1e81fe121832 Use geekdroid from jitpack instead of prebuilt library
Da Risk <da_risk@geekorum.com>
parents: 611
diff changeset
    48
            url = uri("https://jitpack.io")
1e81fe121832 Use geekdroid from jitpack instead of prebuilt library
Da Risk <da_risk@geekorum.com>
parents: 611
diff changeset
    49
        }
161
a359009c33c3 Build: create version alignment platform for all projects
Da Risk <da_risk@geekorum.com>
parents: 147
diff changeset
    50
    }
a359009c33c3 Build: create version alignment platform for all projects
Da Risk <da_risk@geekorum.com>
parents: 147
diff changeset
    51
    dependencies {
a359009c33c3 Build: create version alignment platform for all projects
Da Risk <da_risk@geekorum.com>
parents: 147
diff changeset
    52
        createComponentsPlatforms()
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    53
    }
599
235be2a04607 build: configure annotation processor deps to build on java 11
Da Risk <da_risk@geekorum.com>
parents: 591
diff changeset
    54
    configureAnnotationProcessorDeps()
280
1f5e9db3308e Update to kotlin 1.3.40
Da Risk <da_risk@geekorum.com>
parents: 233
diff changeset
    55
525
e884f73f9eef build: update source-licence-checker and enable it with a flag on ci build only
Da Risk <da_risk@geekorum.com>
parents: 521
diff changeset
    56
    apply<SourceLicenseCheckerPlugin>()
e884f73f9eef build: update source-licence-checker and enable it with a flag on ci build only
Da Risk <da_risk@geekorum.com>
parents: 521
diff changeset
    57
280
1f5e9db3308e Update to kotlin 1.3.40
Da Risk <da_risk@geekorum.com>
parents: 233
diff changeset
    58
    tasks.withType<KotlinCompile> {
342
10640a083343 OnDemandModuleManager: use flow instead of channel when applicable
Da Risk <da_risk@geekorum.com>
parents: 341
diff changeset
    59
        kotlinOptions {
944
f542381c10d3 build: update to kotlin 1.8.0
Da Risk <da_risk@geekorum.com>
parents: 943
diff changeset
    60
            freeCompilerArgs = listOf("-Xjvm-default=all")
342
10640a083343 OnDemandModuleManager: use flow instead of channel when applicable
Da Risk <da_risk@geekorum.com>
parents: 341
diff changeset
    61
        }
280
1f5e9db3308e Update to kotlin 1.3.40
Da Risk <da_risk@geekorum.com>
parents: 233
diff changeset
    62
    }
363
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    63
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    64
    afterEvaluate {
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    65
        extensions.findByType<KaptExtension>()?.arguments {
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    66
            arg("dagger.formatGeneratedSource", "enabled")
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    67
        }
1013
18d820f292d6 build: rework buildSrc to use agp-api
Da Risk <da_risk@geekorum.com>
parents: 944
diff changeset
    68
        extensions.findByType(CommonExtension::class.java)?.apply {
364
968f44db1e96 Configure Java version globally
Da Risk <da_risk@geekorum.com>
parents: 363
diff changeset
    69
            configureJavaVersion()
968f44db1e96 Configure Java version globally
Da Risk <da_risk@geekorum.com>
parents: 363
diff changeset
    70
        }
363
217663200f13 Update to dagger 2.4
Da Risk <da_risk@geekorum.com>
parents: 353
diff changeset
    71
    }
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    72
}
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    73
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    74
tasks.register("clean", Delete::class.java) {
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    75
    delete(buildDir)
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    76
}