@@ -4,18 +4,18 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
4
4
plugins {
5
5
`maven- publish`
6
6
id(" io.github.gradle-nexus.publish-plugin" ) version " 1.3.0"
7
- id(" com.github.johnrengelman.shadow" ) version " 8.1.0 "
7
+ id(" com.github.johnrengelman.shadow" ) version " 8.1.1 "
8
8
id(" cl.franciscosolis.blossom-extended" ) version " 1.3.1"
9
9
10
- kotlin(" jvm" ) version " 1.8 .10"
11
- id(" org.jetbrains.dokka" ) version " 1.8.10 "
10
+ kotlin(" jvm" ) version " 1.9 .10"
11
+ id(" org.jetbrains.dokka" ) version " 1.9.0 "
12
12
}
13
13
14
14
val env = project.rootProject.file(" .env" ).let { file ->
15
15
if (file.exists()) file.readLines().filter { it.isNotBlank() && ! it.startsWith(" #" ) && it.split(" =" ).size == 2 }.associate { it.split(" =" )[0 ] to it.split(" =" )[1 ] } else emptyMap()
16
16
}.toMutableMap().apply { putAll(System .getenv()) }
17
17
18
- val projectVersion = env[" VERSION" ] ? : " 0.3.1 -SNAPSHOT"
18
+ val projectVersion = env[" VERSION" ] ? : " 0.4.0 -SNAPSHOT"
19
19
20
20
group = " xyz.theprogramsrc"
21
21
version = projectVersion
@@ -26,21 +26,31 @@ repositories {
26
26
mavenCentral()
27
27
28
28
maven(" https://s01.oss.sonatype.org/content/groups/public/" )
29
+ maven(" https://oss.sonatype.org/content/repositories/snapshots/" )
30
+ maven(" https://oss.sonatype.org/content/repositories/releases/" )
29
31
maven(" https://oss.sonatype.org/content/groups/public/" )
30
32
maven(" https://hub.spigotmc.org/nexus/content/repositories/snapshots/" )
33
+ maven(" https://repo.papermc.io/repository/maven-public/" )
31
34
maven(" https://repo.codemc.org/repository/maven-public/" )
32
35
maven(" https://jitpack.io/" )
33
36
}
34
37
35
38
dependencies {
36
- compileOnly(" xyz.theprogramsrc:simplecoreapi:0.6.2 -SNAPSHOT" )
39
+ compileOnly(" xyz.theprogramsrc:simplecoreapi:0.8.0 -SNAPSHOT" )
37
40
38
41
implementation(" org.apache.logging.log4j:log4j-api:2.20.0" )
39
42
implementation(" org.apache.logging.log4j:log4j-core:2.20.0" )
40
43
41
- testImplementation(" org.junit.jupiter:junit-jupiter:5.9.2 " )
44
+ testImplementation(" org.junit.jupiter:junit-jupiter:5.10.0 " )
42
45
}
43
46
47
+ blossom {
48
+ replaceToken(" @name@" , rootProject.name)
49
+ replaceToken(" @version@" , project.version.toString())
50
+ replaceToken(" @description@" , project.description)
51
+ replaceToken(" @git_short@" , env[" GIT_COMMIT_SHORT_HASH" ] ? : " unknown" )
52
+ replaceToken(" @git_full@" , env[" GIT_COMMIT_LONG_HASH" ] ? : " unknown" )
53
+ }
44
54
45
55
tasks {
46
56
named<ShadowJar >(" shadowJar" ) {
@@ -88,8 +98,7 @@ tasks {
88
98
}
89
99
90
100
dokkaHtml {
91
- outputDirectory.set(file(project.buildDir.absolutePath + " /dokka" ))
92
-
101
+ outputDirectory.set(layout.buildDirectory.dir(" dokka/" ))
93
102
}
94
103
}
95
104
@@ -161,14 +170,16 @@ publishing {
161
170
}
162
171
}
163
172
164
- nexusPublishing {
165
- repositories {
166
- sonatype {
167
- nexusUrl.set(uri(" https://s01.oss.sonatype.org/service/local/" ))
168
- snapshotRepositoryUrl.set(uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" ))
173
+ if (env[" ENV" ] == " prod" ) {
174
+ nexusPublishing {
175
+ repositories {
176
+ sonatype {
177
+ nexusUrl.set(uri(" https://s01.oss.sonatype.org/service/local/" ))
178
+ snapshotRepositoryUrl.set(uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" ))
169
179
170
- username.set(env[" SONATYPE_USERNAME" ])
171
- password.set(env[" SONATYPE_PASSWORD" ])
180
+ username.set(env[" SONATYPE_USERNAME" ])
181
+ password.set(env[" SONATYPE_PASSWORD" ])
182
+ }
172
183
}
173
184
}
174
185
}
0 commit comments