-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
53 lines (46 loc) · 1.36 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
buildscript {
extra["kotlin_plugin_id"] = "love.forte.plugin.suspend-transform"
}
val ktVersion = libs.versions.kotlin.get()
group = IProject.GROUP
description = IProject.DESCRIPTION
version = ktVersion + "-" + IProject.pluginVersion
allprojects {
group = IProject.GROUP
description = IProject.DESCRIPTION
version = ktVersion + "-" + IProject.pluginVersion
repositories {
mavenCentral()
gradlePluginPortal()
mavenLocal()
//maven {
// url = URI("")
//}
}
this.tasks.withType<JavaCompile> {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.encoding = "UTF-8"
}
this.tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
javaParameters.set(true)
}
}
}
apply(plugin = "suspend-transform.nexus-publish")
tasks.create("createChangelog") {
group = "documentation"
doFirst {
val tag = "v$ktVersion-${IProject.pluginVersion}"
val changelogDir = rootProject.file(".changelog").apply { mkdirs() }
with(File(changelogDir, "$tag.md")) {
if (!exists()) {
createNewFile()
}
writeText("Kotlin version: `v$ktVersion`")
}
}
}