-
Notifications
You must be signed in to change notification settings - Fork 286
/
Copy pathbuild.gradle.kts
62 lines (54 loc) · 1.5 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
54
55
56
57
58
59
60
61
62
/**
* To build Robocode, you need to run this command:
* ./gradlew build
*
* To clean the build, to run this command:
* ./gradlew clean
*
* To run Robocode you need to build Robocode and do a `cd .sandbox` and write `robocode.bat` or `robocode.sh`
*
* The distribution file for Robocode is put into /build and named `robocode.x.x.x.x-setup.jar`
* The x.x.x.x is a version number like e.g. 1.9.5.4
*
* You can run the distribution file with hava like this:
* java -jar robocode.x.x.x.x-setup.jar
*/
plugins {
`java-library`
idea
alias(libs.plugins.nexus.publish)
alias(libs.plugins.ben.manes.versions)
}
description = "Robocode - Build the best - destroy the rest!"
val ossrhUsername: String by project
val ossrhPassword: String by project
subprojects {
apply(plugin = "java")
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
}
tasks {
named("clean") {
delete(".sandbox")
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://oss.sonatype.org/content/repositories/snapshots/"))
stagingProfileId.set("c7f511545ccf8")
username.set(ossrhUsername)
password.set(ossrhPassword)
}
}
}
val initializeSonatypeStagingRepository by tasks.existing
subprojects {
initializeSonatypeStagingRepository {
shouldRunAfter(tasks.withType<Sign>())
}
}