|
2 | 2 | * Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved. |
3 | 3 | * SPDX-License-Identifier: GPL-3.0-only |
4 | 4 | */ |
5 | | -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
6 | | -import com.android.build.gradle.BaseExtension |
7 | | -import kotlinx.validation.ApiValidationExtension |
8 | | - |
9 | 5 | buildscript { |
| 6 | + apply(from = "buildSrc/buildDependencies.gradle") |
| 7 | + val build: Map<Any, Any> by extra |
10 | 8 | repositories { |
11 | 9 | google() |
12 | 10 | jcenter() |
13 | 11 | // For binary compatibility validator. |
14 | 12 | maven { url = uri("https://kotlin.bintray.com/kotlinx") } |
15 | 13 | } |
16 | 14 | dependencies { |
17 | | - classpath(Plugins.agp) |
18 | | - classpath(Plugins.binaryCompatibilityValidator) |
19 | | - classpath(Plugins.kotlin) |
| 15 | + classpath(build.getValue("androidGradlePlugin")) |
| 16 | + classpath(build.getValue("binaryCompatibilityValidator")) |
| 17 | + classpath(build.getValue("kotlinGradlePlugin")) |
20 | 18 | } |
21 | 19 | } |
22 | 20 |
|
23 | 21 | plugins { |
24 | 22 | id("com.github.ben-manes.versions") version "0.33.0" |
25 | | -} |
26 | | - |
27 | | -apply(plugin = "binary-compatibility-validator") |
28 | | - |
29 | | -extensions.configure<ApiValidationExtension> { |
30 | | - ignoredProjects = mutableSetOf( |
31 | | - "app" |
32 | | - ) |
33 | | -} |
34 | | - |
35 | | -subprojects { |
36 | | - repositories { |
37 | | - google() |
38 | | - jcenter() |
39 | | - maven { |
40 | | - setUrl("https://jitpack.io") |
41 | | - } |
42 | | - } |
43 | | - if (name == "app") { |
44 | | - apply(plugin = "com.android.application") |
45 | | - } else { |
46 | | - apply(plugin = "com.android.library") |
47 | | - } |
48 | | - configure<BaseExtension> { |
49 | | - compileSdkVersion(29) |
50 | | - defaultConfig { |
51 | | - minSdkVersion(23) |
52 | | - targetSdkVersion(29) |
53 | | - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" |
54 | | - } |
55 | | - compileOptions { |
56 | | - sourceCompatibility = JavaVersion.VERSION_1_8 |
57 | | - targetCompatibility = JavaVersion.VERSION_1_8 |
58 | | - } |
59 | | - tasks.withType<JavaCompile> { |
60 | | - options.compilerArgs.add("-Xlint:unchecked") |
61 | | - options.isDeprecation = true |
62 | | - } |
63 | | - } |
64 | | - tasks.withType<KotlinCompile> { |
65 | | - kotlinOptions { |
66 | | - jvmTarget = "1.8" |
67 | | - freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn", "-Xallow-result-return-type") |
68 | | - languageVersion = "1.4" |
69 | | - } |
70 | | - } |
71 | | -} |
72 | | - |
73 | | -tasks.wrapper { |
74 | | - gradleVersion = "6.6.1" |
75 | | - distributionType = Wrapper.DistributionType.ALL |
76 | | - distributionSha256Sum = "11657af6356b7587bfb37287b5992e94a9686d5c8a0a1b60b87b9928a2decde5" |
| 23 | + `binary-compatibility-validator` |
| 24 | + `aps-plugin` |
77 | 25 | } |
0 commit comments