@@ -2,12 +2,11 @@ import org.ajoberstar.grgit.Grgit
22import java.util.*
33
44plugins {
5- kotlin( " jvm " ) version " 1.8.21 "
5+ java
66 id(" org.ajoberstar.grgit" ) version " 5.2.0"
77 `java- library`
88 `maven- publish`
99 signing
10- id(" org.jetbrains.dokka" ) version " 1.8.10"
1110}
1211
1312if (! File (" $rootDir /.git" ).exists()) {
@@ -22,7 +21,7 @@ if (!File("$rootDir/.git").exists()) {
2221}
2322
2423group = " dev.themeinerlp"
25- var baseVersion by extra(" 1.0 .0" )
24+ var baseVersion by extra(" 1.1 .0" )
2625var extension by extra(" " )
2726var snapshot by extra(" -SNAPSHOT" )
2827
@@ -44,73 +43,27 @@ repositories {
4443dependencies {
4544 implementation(" net.lingala.zip4j:zip4j:2.11.5" )
4645 implementation(" com.google.code.gson:gson:2.10.1" )
47- // Test
48- testImplementation(" net.lingala.zip4j:zip4j:2.11.5" )
49- testImplementation(" com.google.code.gson:gson:2.10.1" )
50- testImplementation(kotlin(" test" ))
5146}
5247
5348tasks {
5449 test {
5550 useJUnitPlatform()
5651 }
57- dokkaHtml {
58- dokkaSourceSets {
59- named(" main" ) {
60- moduleName.set(" Plugin Debug" )
61- includes.from(" module.md" )
62- description = " A simple library to upload plugin debugs"
63- version = " %s%s" .format(Locale .ROOT , baseVersion, snapshot)
64- }
65- }
66- }
67- dokkaJavadoc {
68- dokkaSourceSets {
69- named(" main" ) {
70- moduleName.set(" Plugin Debug" )
71- description = " A simple library to upload plugin debugs"
72- includes.from(" module.md" )
73- version = " %s%s" .format(Locale .ROOT , baseVersion, snapshot)
74- }
75- }
76- }
7752}
7853
79- kotlin {
80- jvmToolchain(17 )
81- sourceSets.all {
82- languageSettings {
83- languageVersion = " 2.0"
84- }
54+ java {
55+ toolchain {
56+ languageVersion.set(JavaLanguageVersion .of(17 ))
8557 }
8658}
8759
88- val sourceJar by tasks.register<Jar >(" kotlinJar" ) {
89- from(sourceSets.main.get().allSource)
90- archiveClassifier.set(" sources" )
91- }
92- val dokkaJavadocJar by tasks.register<Jar >(" dokkaHtmlJar" ) {
93- dependsOn(rootProject.tasks.dokkaHtml)
94- from(rootProject.tasks.dokkaHtml.flatMap { it.outputDirectory })
95- archiveClassifier.set(" html-docs" )
96- }
97-
98- val dokkaHtmlJar by tasks.register<Jar >(" dokkaJavadocJar" ) {
99- dependsOn(rootProject.tasks.dokkaJavadoc)
100- from(rootProject.tasks.dokkaJavadoc.flatMap { it.outputDirectory })
101- archiveClassifier.set(" javadoc" )
102- }
103-
10460publishing {
10561 publications {
10662 create<MavenPublication >(" mavenJava" ) {
10763 from(components.findByName(" java" ))
10864 groupId = " dev.themeinerlp"
10965 artifactId = " plugin-debug"
11066 version = " %s%s" .format(Locale .ROOT , baseVersion, snapshot)
111- artifact(dokkaJavadocJar)
112- artifact(dokkaHtmlJar)
113- artifact(sourceJar)
11467 pom {
11568 name.set(" Plugin debug" )
11669 description.set(" A simple library to upload plugin debugs" )
0 commit comments