-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
129 lines (106 loc) · 2.92 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
122
123
124
125
126
127
128
129
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java'
id 'eclipse'
id 'maven-publish'
id 'signing'
}
group = 'dev.array21'
version = '2.1.0'
sourceCompatibility = 1.16
targetCompatibility = 1.16
repositories {
mavenCentral()
maven{ url "https://hub.spigotmc.org/nexus/content/repositories/snapshots" }
maven{ url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url 'https://jitpack.io' }
mavenLocal()
}
dependencies {
compileOnly 'dev.array21:dutchycore:0.1.0'
compileOnly 'dev.array21:dutchyhome:2.2.0'
compileOnly 'org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT'
}
task processSource(type: Sync) {
from sourceSets.main.java
inputs.property 'version', version
filter(ReplaceTokens, tokens: [VERSION: version])
into "$buildDir/src"
}
compileJava {
source = processSource.outputs
}
task ghActions(type: Jar) {
description 'GitHub Actions task. Not used for regular development'
version = ''
archiveClassifier = ''
archiveBaseName = 'output'
from sourceSets.main.output
destinationDirectory = file("$rootDir/actions")
}
task testJar(type: Jar) {
description 'Build a test Jar'
archiveClassifier = 'DEV'
from sourceSets.main.output
destinationDirectory = file("$rootDir/../DutchyCore/server/plugins/DutchyCore/modules/")
}
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
publishing {
repositories {
maven {
name = "ossrh"
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = findProperty('ossrhUsername')
password = findProperty('ossrhPassword')
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'DutchyBack'
artifactId = 'dutchback'
packaging = 'jar'
description = 'Minecraft Spigot Back Plugin'
url = 'https://github.com/DutchyPlugins/DutchyBack'
scm {
connection = 'scm:git:git://github.com/DutchyPlugins/DutchyBack.git'
developerConnection = 'scm:git:ssh://github.com/DutchyPlugins/DutchyBack.git'
url = 'https://github.com/DutchyPlugins/DutchyBack'
}
licenses {
license {
name = 'GPL-v3'
url = 'https://github.com/DutchyPlugins/DutchyBack/blob/master/LICENSE'
}
}
developers {
developer {
id = 'tobiasdebruijn'
name = 'Tobias de Bruijn'
email = '[email protected]'
}
}
}
}
}
}
signing {
if(!System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
sign publishing.publications.mavenJava
}}
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}