-
Notifications
You must be signed in to change notification settings - Fork 248
/
build.gradle.kts
113 lines (96 loc) · 3.12 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import java.net.URL
plugins {
id(Plugins.BuildPlugins.androidLib)
id(Plugins.BuildPlugins.kotlinAndroid)
id(Plugins.BuildPlugins.kotlinKapt)
id(Plugins.BuildPlugins.mavenPublish)
jacoco
id(Plugins.BuildPlugins.dokka).version(Plugins.Versions.dokka)
}
publishArtifact(Releases.ImplmentationGuide)
createJacocoTestReportTask()
android {
compileSdk = Sdk.compileSdk
defaultConfig {
minSdk = Sdk.minSdk
targetSdk = Sdk.targetSdk
testInstrumentationRunner = Dependencies.androidJunitRunner
// Need to specify this to prevent junit runner from going deep into our dependencies
testInstrumentationRunnerArguments["package"] = "com.google.android.fhir.implementationguide"
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = Java.sourceCompatibility
targetCompatibility = Java.targetCompatibility
}
packagingOptions {
resources.excludes.addAll(
listOf(
"license.html",
"META-INF/ASL2.0",
"META-INF/ASL-2.0.txt",
"META-INF/DEPENDENCIES",
"META-INF/LGPL-3.0.txt",
"META-INF/LICENSE",
"META-INF/LICENSE.txt",
"META-INF/license.txt",
"META-INF/license.html",
"META-INF/LICENSE.md",
"META-INF/NOTICE",
"META-INF/NOTICE.txt",
"META-INF/NOTICE.md",
"META-INF/notice.txt",
"META-INF/LGPL-3.0.txt",
"META-INF/sun-jaxb.episode",
)
)
}
kotlinOptions { jvmTarget = Java.kotlinJvmTarget.toString() }
configureJacocoTestOptions()
}
configurations {
all {
exclude(module = "xpp3")
exclude(module = "xpp3_min")
}
}
dependencies {
androidTestImplementation(Dependencies.AndroidxTest.core)
androidTestImplementation(Dependencies.AndroidxTest.runner)
androidTestImplementation(Dependencies.AndroidxTest.extJunitKtx)
androidTestImplementation(Dependencies.Kotlin.kotlinCoroutinesTest)
androidTestImplementation(Dependencies.junit)
androidTestImplementation(Dependencies.truth)
api(Dependencies.HapiFhir.structuresR4) { exclude(module = "junit") }
coreLibraryDesugaring(Dependencies.desugarJdkLibs)
implementation(Dependencies.Kotlin.stdlib)
implementation(Dependencies.Room.ktx)
implementation(Dependencies.Room.runtime)
implementation(Dependencies.timber)
kapt(Dependencies.Room.compiler)
}
tasks.dokkaHtml.configure {
outputDirectory.set(
file("../docs/${Releases.ImplmentationGuide.artifactId}/${Releases.ImplmentationGuide.version}")
)
suppressInheritedMembers.set(true)
dokkaSourceSets {
named("main") {
moduleName.set(Releases.ImplmentationGuide.artifactId)
moduleVersion.set(Releases.ImplmentationGuide.version)
noAndroidSdkLink.set(false)
externalDocumentationLink {
url.set(URL("https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-structures-r4/"))
packageListUrl.set(
URL("https://hapifhir.io/hapi-fhir/apidocs/hapi-fhir-structures-r4/element-list")
)
}
}
}
}