forked from jorfao/multiplatform-swiftpackage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
85 lines (69 loc) · 1.89 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
@Suppress("DSL_SCOPE_VIOLATION")
repositories {
google()
mavenCentral()
}
plugins {
`kotlin-dsl`
`java-gradle-plugin`
`maven-publish`
libs.plugins.binary.compatibility.validator
}
version = Plugin.Config.version
dependencies {
compileOnly(kotlin("gradle-plugin"))
testImplementation(libs.kotest.runner)
testImplementation(libs.kotest.assertions)
testImplementation(libs.kotest.property)
testImplementation(libs.mockk)
testImplementation(kotlin("gradle-plugin"))
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withJavadocJar()
withSourcesJar()
}
kotlin {
jvmToolchain(17)
}
tasks.withType<Test> {
useJUnitPlatform()
}
extensions.findByName("buildScan")?.withGroovyBuilder {
setProperty("termsOfServiceUrl", "https://gradle.com/terms-of-service")
setProperty("termsOfServiceAgree", "yes")
}
gradlePlugin {
plugins.create(Plugin.Config.name) {
id = Plugin.Config.id
implementationClass = Plugin.Config.implementationClass
}
}
publishing {
publications {
create<MavenPublication>("pluginMaven") {
groupId = "com.speechify"
artifactId = "multiplatform-swiftpackage.gradle.plugin"
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/speechifyinc/multiplatform-swiftpackage")
credentials {
// TODO: find ways to manage this better
username = System.getenv("PLATFORM_USERNAME")
password = System.getenv("PLATFORM_PAT")
}
}
}
}
tasks.javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}
tasks.withType<Copy> {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}