-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathIProject.kt
51 lines (41 loc) · 1.63 KB
/
IProject.kt
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
import IProject.IS_SNAPSHOT
import love.forte.gradle.common.core.project.ProjectDetail
import org.gradle.api.Project
object IProject : ProjectDetail() {
const val IS_SNAPSHOT = false
const val GROUP = "love.forte.plugin.suspend-transform"
const val DESCRIPTION = "Generate platform-compatible functions for Kotlin suspend functions"
const val HOMEPAGE = "https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin"
// Remember the libs.versions.toml!
val ktVersion = "2.1.0"
val pluginVersion = "0.11.0"
override val version: String = "$ktVersion-$pluginVersion"
override val homepage: String get() = HOMEPAGE
override val description: String get() = DESCRIPTION
override val developers: List<Developer> = developers {
developer {
id = "forte"
name = "ForteScarlet"
email = "[email protected]"
url = "https://github.com/ForteScarlet"
}
}
override val group: String get() = GROUP
override val licenses: List<License> = licenses {
license {
name = "MIT License"
url = "https://mit-license.org/"
}
}
override val scm: Scm = scm {
url = HOMEPAGE
connection = "scm:git:$HOMEPAGE.git"
developerConnection = "scm:git:ssh://[email protected]/ForteScarlet/kotlin-suspend-transform-compiler-plugin.git"
}
}
fun Project.setupWith(ktVersion: String) {
group = IProject.GROUP
description = IProject.DESCRIPTION
val mergedVersion = ktVersion + "-" + IProject.pluginVersion
version = if (IS_SNAPSHOT) "$mergedVersion-SNAPSHOT" else mergedVersion
}