forked from sqldelight/sqldelight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
82 lines (70 loc) · 1.99 KB
/
build.gradle
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
apply from: "$rootDir/gradle/dependencies.gradle"
repositories {
mavenCentral()
google()
jcenter()
gradlePluginPortal()
maven {
url 'https://jitpack.io'
}
}
dependencies {
classpath deps.plugins.download
classpath deps.plugins.kotlin
classpath deps.plugins.dokka
classpath deps.plugins.intellij
classpath deps.plugins.android
classpath deps.plugins.grammarKit
// Used for the sample
classpath "com.squareup.sqldelight:gradle-plugin:${versions.sqldelight}"
}
}
apply from: "$rootDir/gradle/updateDependencies.gradle"
apply from: "$rootDir/gradle/dependencies.gradle"
allprojects {
repositories {
mavenCentral()
google()
jcenter()
}
tasks.withType(Test) {
testLogging {
events = ["failed", "skipped", "passed"]
exceptionFormat "full"
}
}
if (plugins.hasPlugin("org.jetbrains.kotlin.jvm")) {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
plugins.withId("com.android.library") {
extensions.getByName("android").compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
tasks.withType(KotlinCompile) {
kotlinOptions {
jvmTarget = "1.8"
}
}
group = GROUP
version = VERSION_NAME
}
def addDependency(Upload task, String groupId, String artifactId, String version, String type) {
task.repositories.withType(org.gradle.api.artifacts.maven.MavenDeployer) { mavenDeployer ->
task.doFirst {
mavenDeployer.pom.whenConfigured {
// For whatever reason we can't 'new' these ourselves. Clone an existing instance instead.
def dependency = it.dependencies.get(0).clone()
dependency.groupId = groupId
dependency.artifactId = artifactId
dependency.version = version
dependency.type = type
it.dependencies.add(dependency)
}
}
}
}