-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle.kts
87 lines (77 loc) · 2.3 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
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.SonatypeHost
import kotlinx.kover.api.CoverageEngine.JACOCO
import kotlinx.kover.tasks.KoverMergedHtmlReportTask
import kotlinx.kover.tasks.KoverMergedXmlReportTask
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
plugins {
alias(libs.plugins.kotlin.multiplatform).apply(false)
alias(libs.plugins.kover)
alias(libs.plugins.mavenPublish)
}
repositories {
mavenCentral()
gradlePluginPortal()
google()
}
kover {
coverageEngine.set(JACOCO)
}
tasks.withType<KoverMergedHtmlReportTask>().configureEach {
isEnabled = true
}
tasks.withType<KoverMergedXmlReportTask>().configureEach {
isEnabled = true
}
allprojects {
group = project.property("GROUP") as String
version = project.property("VERSION_NAME") as String
plugins.withId("com.vanniktech.maven.publish.base") {
configure<MavenPublishBaseExtension> {
publishToMavenCentral(SonatypeHost.S01, automaticRelease = true)
signAllPublications()
pom {
description.set("A simple, lightweight, multiplatform image diffing library.")
name.set(project.name)
url.set("https://github.com/dropbox/differ/")
licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
}
}
scm {
url.set("https://github.com/dropbox/differ/")
connection.set("scm:git:git://github.com/dropbox/differ.git")
developerConnection.set("scm:git:ssh://[email protected]/dropbox/differ.git")
}
developers {
developer {
id.set("dropbox")
name.set("Dropbox, Inc.")
}
}
}
}
}
}
subprojects {
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}
tasks.withType<KotlinJvmCompile>().configureEach {
compilerOptions.jvmTarget = JvmTarget.JVM_1_8
}
repositories {
mavenCentral()
}
}
tasks.register("printVersionName") {
doLast {
val VERSION_NAME: String by project
println(VERSION_NAME)
}
}