-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
101 lines (82 loc) · 3.18 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
plugins {
// Apply the Java Gradle plugin development plugin to add support for developing Gradle plugins
// https://docs.gradle.org/current/userguide/java_gradle_plugin.html
id 'java-gradle-plugin'
// Publish plugins to the Gradle Plugin Portal
// https://plugins.gradle.org/plugin/com.gradle.plugin-publish
id "com.gradle.plugin-publish" version "0.14.0"
// Provides the ability to publish build artifacts to an Apache Maven repository
// https://docs.gradle.org/current/userguide/publishing_maven.html
id 'maven-publish'
// https://plugins.gradle.org/plugin/net.ltgt.errorprone
id 'net.ltgt.errorprone' version '2.0.1'
// Plugin that keeps your code spotless with Gradle
// https://plugins.gradle.org/plugin/com.diffplug.spotless
id "com.diffplug.spotless" version "5.12.1"
}
apply plugin: 'com.diffplug.spotless'
apply from: "https://gist.githubusercontent.com/yooksi/${spotlessGistID}/raw/spotless.gradle"
// exclude decompiler code from formatting
spotless.java {
it.targetExclude '**/org/jetbrains/**/*'
}
apply from: 'test.gradle'
version '0.4.2'
group 'io.pzstorm.capsid'
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.7.1'
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.1'
// https://mvnrepository.com/artifact/com.google.guava/guava
implementation 'com.google.guava:guava:30.1-jre'
// https://mvnrepository.com/artifact/org.jetbrains/annotations
compileOnly 'org.jetbrains:annotations:20.1.0'
// https://mvnrepository.com/artifact/com.google.errorprone/error_prone_core
errorprone 'com.google.errorprone:error_prone_core:2.6.0'
// https://mvnrepository.com/artifact/com.google.errorprone/javac
errorproneJavac('com.google.errorprone:javac:9+181-r4173-1')
}
gradlePlugin {
//noinspection GroovyAssignabilityCheck
plugins {
capsid {
id = 'io.pzstorm.capsid'
implementationClass = 'io.pzstorm.capsid.CapsidPlugin'
}
}
testSourceSets(sourceSets.integrationTest, sourceSets.functionalTest)
}
pluginBundle {
website = 'https://github.com/pzstorm/capsid'
vcsUrl = 'https://github.com/pzstorm/capsid'
description = 'Project Zomboid mod development framework for Gradle'
tags = ['java', 'project-zomboid', 'modding', 'framework']
plugins {
capsid.displayName = 'Storm Capsid'
}
}
// publish to mavenLocal every time we build project
getTasks().named('classes').configure({
it.finalizedBy('publishToMavenLocal')
})
// publish to mavenLocal after all classes have been compiled
publishToMavenLocal {
mustRunAfter('testClasses', 'functionalTestClasses', 'integrationTestClasses')
}
// turn off doclint for Javadoc tasks
// https://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
compileJava {
options.errorprone {
// exclude de-compiler code from being checked by error prone
excludedPaths = '.*/src/main/java/org/jetbrains/.*'
}
}
// include license files in artifact jar
jar.from 'LICENSE', 'NOTICE'