-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
121 lines (102 loc) · 3.24 KB
/
build.gradle
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.70'
id 'maven-publish'
id "org.jetbrains.kotlin.plugin.serialization" version '1.3.70'
}
if (System.getenv("GITHUB_RUN_NUMBER")!=null) {
pluginVersion += "." + System.getenv("GITHUB_RUN_NUMBER")
}
group = pluginGroup
version = pluginVersion
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
def github_username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
def github_password = project.findProperty("gpr.key") ?: System.getenv("PASSWORD")
repositories {
mavenCentral()
jcenter()
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/CultOfClang/Minecraft/")
credentials {
username = github_username
password = github_password
}
}
}
dependencies {
compileOnly 'org.bukkit:bukkit:1.15.2-R0.1-SNAPSHOT'
// i guess.
implementation 'org.cultofclang.minecraft:kotlinspice:0.1.9'
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.0")
}
processResources {
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [version: version]
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/CultOfClang/Minecraft/")
credentials {
username = github_username
password = github_password
}
}
}
publications {
gpr(MavenPublication) {
from components.java
pom {
name = 'Gaea'
description = 'World slowly returns to original state.'
url = 'https://github.com/CultOfClang/Gaea'
licenses {
license {
name = 'CC BY-ND 4.0'
url = 'https://creativecommons.org/licenses/by-nd/4.0/'
}
}
developers {
developer {
id = 'lizelive'
name = 'lizelive'
email = '[email protected]'
}
}
scm {
connection = 'scm:https://github.com/CultOfClang/Gaea.git'
developerConnection = 'scm:git:ssh://[email protected]:CultOfClang/Gaea.git'
url = 'https://github.com/CultOfClang/Gaea'
}
}
}
}
}
//Move into plugins folder
if (project.hasProperty("plugin_path") && plugin_path) {
task copyJar(type: Copy) {
from jar
into plugin_path
}
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
test{
useJUnitPlatform()
testLogging.showStandardStreams = true
beforeTest { descriptor ->
logger.lifecycle("Running test: " + descriptor)
}
onOutput { descriptor, event ->
logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message )
}
}