-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
78 lines (64 loc) · 1.83 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import org.gradle.internal.impldep.org.bouncycastle.cms.RecipientId.password
plugins {
`java-gradle-plugin`
`maven-publish`
kotlin("jvm") version "1.9.0"
id("com.gradle.plugin-publish") version "1.2.0"
}
val isSnapshot = providers.environmentVariable("SNAPSHOT").getOrElse("false").toBoolean()
group = "dev.nanite.plugins"
version = "0.2.1${if (isSnapshot) "-SNAPSHOT" else ""}"
description = "Not sure yet"
repositories {
mavenCentral()
}
dependencies {
implementation(gradleApi())
testImplementation(kotlin("test:1.8.10"))
testImplementation("org.junit.jupiter:junit-jupiter:5.9.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.9.2")
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}
java {
withSourcesJar()
}
tasks.withType(JavaCompile::class.java).all {
options.release = 17
}
gradlePlugin {
website = "https://github.com/errormikey/insaniam"
vcsUrl = "https://github.com/errormikey/insaniam"
// testSourceSet(sourceSets["test"])
plugins.create("insaniam") {
id = "dev.nanite.plugins.insaniam"
implementationClass = "dev.nanite.insaniam.InsaniamPlugin"
displayName = "Insaniam"
description = project.description
version = project.version
tags = listOf("minecraft", )
}
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
repositories {
val token = providers.environmentVariable("NANITE_TOKEN")
if (token.isPresent()) {
maven {
url = uri("https://maven.nanite.dev/${if (isSnapshot) "snapshots" else "releases"}")
credentials {
username = "nanite"
password = token.get()
}
}
}
}
}