-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
92 lines (77 loc) · 2.17 KB
/
build.gradle
File metadata and controls
92 lines (77 loc) · 2.17 KB
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
plugins {
id("com.gradleup.shadow") version "8.3.2"
id 'maven-publish'
}
subprojects {
apply plugin: "com.gradleup.shadow"
apply plugin: 'java'
apply plugin: 'maven-publish'
group = 'com.wizardlybump17.wlib'
version = '1.6.8'
repositories {
mavenLocal()
mavenCentral()
maven {
url("https://repo.papermc.io/repository/maven-public/")
}
}
sourceCompatibility = '16'
targetCompatibility = '16'
tasks {
compileJava {
options.encoding = 'UTF-8'
}
assemble {
dependsOn(shadowJar)
for (def reobfJar in getTasksByName("reobfJar", false))
dependsOn(reobfJar)
}
}
java {
withSourcesJar()
}
}
subprojects {
apply plugin: 'maven-publish'
if (project.name == 'versions' || project.name.matches('v\\d_\\d+_R\\d+')) {
tasks.withType(PublishToMavenRepository).configureEach {
it.enabled = false
}
return
}
publishing {
repositories {
maven {
name = 'GitHubPackages'
url = uri('https://maven.pkg.github.com/wizardlybump17/wlib')
credentials {
username = project.findProperty('gpr.user') ?: System.getenv('USERNAME')
password = project.findProperty('gpr.key') ?: System.getenv('TOKEN')
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
pom.withXml {
asNode().dependencies.dependency.each { dep ->
if (dep.artifactId.last().value().last().matches('v\\d_\\d+_R\\d+'))
dep.parent().remove(dep)
}
}
}
}
}
dependencies {
testImplementation(
platform('org.junit:junit-bom:5.10.2'),
'org.junit.jupiter:junit-jupiter:5.10.2'
)
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
}