-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
135 lines (122 loc) · 4.01 KB
/
build.gradle
File metadata and controls
135 lines (122 loc) · 4.01 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
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
130
131
132
133
134
135
// add guava 27 to the classpath of the *build script*
// see https://github.com/spotbugs/spotbugs-gradle-plugin/issues/120
// solution taken from https://github.com/GoogleContainerTools/jib/issues/591
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("com.google.guava:guava:27.0.1-jre")
}
}
plugins {
id 'maven-publish'
id 'idea'
id 'com.github.johnrengelman.shadow' version '5.2.0'
id 'pl.allegro.tech.build.axion-release' version '1.10.1'
id "com.github.spotbugs" version "2.0.0"
}
allprojects {
repositories {
maven { url 'https://jitpack.io' }
maven { // The google mirror is less flaky than mavenCentral()
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
// maven central has packages that are missing from the google mirror
mavenCentral()
mavenLocal()
}
scmVersion {
ignoreUncommittedChanges = false
tag {
prefix = 'release'
}
}
version = scmVersion.version
}
subprojects {
apply plugin: 'checkstyle'
apply plugin: "maven-publish"
apply plugin: "java"
apply plugin: 'com.github.johnrengelman.shadow'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
group 'de.saar.minecraft.infrastructure'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
javadoc {
exclude "de/saar/minecraft/architect/ArchitectInformation*"
exclude "de/saar/minecraft/architect/ArchitectGrpc.java"
exclude "de/saar/minecraft/architect/ArchitectProto.java"
exclude "de/saar/minecraft/shared/*"
exclude "de/saar/minecraft/broker/BrokerGrpc.java"
exclude "de/saar/minecraft/broker/GameData*"
exclude "de/saar/minecraft/broker/BrokerProto.java"
exclude "de/saar/minecraft/broker/db"
failOnError = false
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/minecraft-saar/infrastructure")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GPR_USER")
password = project.findProperty("gpr.key") ?: System.getenv("GPR_API_KEY")
}
}
}
publications {
"$project.name"(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
spotbugs {
toolVersion = '4.0.0-beta4'
ignoreFailures = false
}
checkstyle {
toolVersion = "8.28"
}
checkstyleMain {
source ='src/main/java'
}
checkstyleTest {
source ='src/test/java'
}
tasks.withType(com.github.spotbugs.SpotBugsTask) {
reports {
xml.enabled = false
text.enabled = true
html.enabled = false
}
}
dependencies {
// implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.16.0'
// implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.16.0'
// implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.16.0'
implementation 'org.tinylog:tinylog-api:2.4.1'
implementation 'org.tinylog:tinylog-impl:2.4.1'
compileOnly "javax.annotation:javax.annotation-api:1.2"
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.2'
testImplementation "org.mockito:mockito-core:2.25.1"
}
}
// Local Variables:
// groovy-indent-offset: 4
// indent-tabs-mode: nil
// End: