11import java.net.URL
2- // import com.github.k0shk0sh.easy.version.SnapshotDefinition
2+ import java.util.concurrent.Callable
3+ import com.github.k0shk0sh.easy.version.SnapshotDefinition
34
45plugins {
56 `kotlin- dsl`
67 id(" org.jetbrains.dokka" ) version " 1.5.0"
78 id(" com.vanniktech.maven.publish" ) version " 0.18.0"
8- // id("com.github.k0shk0sh.easy.version") version "+" // get latest always
9+ id(" com.github.breadmoirai.github-release" ) version " 2.2.12"
10+ id(" com.github.k0shk0sh.easy.version" ) version " +" // get latest always
911}
1012
11- // easyVersion {
12- // snapshotLabel = "-SNAPSHOT"
13- // snapshotDefinition = SnapshotDefinition.TIMESTAMP
14- // propertiesToSet = listOf("VERSION_NAME")
15- // setToProjectVersion = true
16- // logVersion = true
17- // }
18-
19- gradlePlugin {
20- plugins {
21- create(" easyVersion" ) {
22- id = " com.github.k0shk0sh.easy.version"
23- implementationClass = " com.github.k0shk0sh.easy.version.EasyVersionPlugin"
24- displayName = " EasyVersion Gradle Plugin"
25- description = " Gradle plugin that manage your App or Library versioning"
26- }
27- }
13+ easyVersion {
14+ snapshotLabel = " -SNAPSHOT"
15+ snapshotDefinition = SnapshotDefinition .TIMESTAMP
16+ propertiesToSet = listOf (" VERSION_NAME" )
17+ setToProjectVersion = true
18+ logVersion = true
2819}
2920
30- repositories {
31- mavenCentral()
32- mavenLocal( )
33- }
34-
35- dependencies {
36- kotlin( " kotlin-gradle " )
37- implementation(gradleApi() )
38- implementation( " com.google.code.gson:gson:2.8.8 " )
21+ githubRelease {
22+ val version = Callable < CharSequence > { project.version.toString() }
23+ token( System .getenv( " GITHUB_TOKEN " ) )
24+ owner( " k0shk0sh " )
25+ repo( " EasyVersion " )
26+ tagName(version)
27+ targetCommitish( " main " )
28+ releaseName(version )
29+ body(changelog() )
3930}
4031
4132tasks.dokkaHtml.configure {
@@ -56,3 +47,25 @@ tasks.dokkaHtml.configure {
5647 }
5748 outputDirectory.set(file(" docs" ))
5849}
50+
51+ gradlePlugin {
52+ plugins {
53+ create(" easyVersion" ) {
54+ id = " com.github.k0shk0sh.easy.version"
55+ implementationClass = " com.github.k0shk0sh.easy.version.EasyVersionPlugin"
56+ displayName = " EasyVersion Gradle Plugin"
57+ description = " Gradle plugin that manage your App or Library versioning"
58+ }
59+ }
60+ }
61+
62+ repositories {
63+ mavenCentral()
64+ mavenLocal()
65+ }
66+
67+ dependencies {
68+ kotlin(" kotlin-gradle" )
69+ implementation(gradleApi())
70+ implementation(" com.google.code.gson:gson:2.8.8" )
71+ }
0 commit comments