This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
98 lines (82 loc) · 2.71 KB
/
build.gradle.kts
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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
description = """
Umbrella project for Khan Academy's datastore access library.
This project is organized into two subprojects (which are packaged into
independent artifacts):
1. schema-metadata
This contains annotations and types for defining datastore models as kotlin
data classes. Everything in here is independent of the Google cloud client
libraries and could be used for expressing schemas for other databases as
well.
2. google-cloud-datastore
Code for using data classes defined within the schema-metadata package as
Google cloud datastore entities. Also contains a default test stub.
"""
group = "org.khanacademy"
version = "0.1.8-pre1"
repositories {
jcenter()
}
plugins {
kotlin("jvm") version "1.3.11"
id("org.jetbrains.dokka") version "0.9.17"
}
val kotlinVersion = "1.3.11"
subprojects {
configurations {
// Even though these are built-in configurations, they won't exist for
// subprojects at the time this file is evaluated, so we need to create
// them.
create("compile")
create("testCompile")
}
}
allprojects {
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
tasks.withType<Test> {
// By default, Gradle won't run the tests if the code hasn't changed;
// ensure we actually run tests whenever we're asked.
outputs.upToDateWhen { false }
testLogging {
quiet {
events = setOf(
TestLogEvent.FAILED
)
exceptionFormat = TestExceptionFormat.FULL
}
events = setOf(
TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT,
TestLogEvent.STANDARD_ERROR
)
exceptionFormat = TestExceptionFormat.FULL
}
useJUnitPlatform()
}
dependencies {
constraints {
// TODO(colin): use a kotlin "bill of materials" when one is released
compile(kotlin("stdlib-jdk8", kotlinVersion))
compile(kotlin("reflect", kotlinVersion))
}
testCompile("io.kotlintest:kotlintest-runner-junit5:3.1.11")
}
}
evaluationDependsOnChildren()
tasks {
dokka {
moduleName = rootProject.name
outputFormat = "html"
outputDirectory = "$buildDir/docs"
jdkVersion = 8
sourceDirs = subprojects.flatMap {
it.sourceSets.main.get().allSource.sourceDirectories
}
}
}