This repository has been archived by the owner on Mar 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
132 lines (114 loc) · 2.52 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
130
131
132
plugins {
id 'java-library'
id 'java-gradle-plugin'
id 'checkstyle'
id 'maven-publish'
id 'net.minecrell.licenser' version '0.4.1'
}
group = 'net.wovenmc'
archivesBaseName = 'woven-gradle'
description = 'A plugin to reduce Woven API modules project boilerplates.'
def baseVersion = '0.1'
def build = 'local'
def ENV = System.getenv()
if (ENV.BUILD_NUMBER) {
build = "automatic #${ENV.BUILD_NUMBER}"
version = "${baseVersion}.${ENV.BUILD_NUMBER}"
} else {
version = "${baseVersion}.local"
}
repositories {
maven {
name 'Fabric'
url 'https://maven.fabricmc.net/'
}
maven {
name 'Gradle plugins'
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
}
dependencies {
api 'org.jetbrains:annotations:20.1.0'
api 'gradle.plugin.net.minecrell:licenser:0.4.1'
implementation gradleApi()
implementation 'net.fabricmc:fabric-loom:0.5.25'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
withJavadocJar()
}
jar {
manifest {
attributes 'Implementation-Version': project.version + ' Build(' + build + ')'
}
from 'LICENSE'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
javadoc {
options {
source = '8'
encoding = 'UTF-8'
charSet = 'UTF-8'
memberLevel = JavadocMemberLevel.PACKAGE
links(
'https://guava.dev/releases/21.0/api/docs/',
'https://asm.ow2.io/javadoc/',
'https://docs.oracle.com/javase/8/docs/api/',
'https://logging.apache.org/log4j/2.x/log4j-api/apidocs/'
)
// Disable the crazy super-strict doclint tool in Java 8
addStringOption('Xdoclint:none', '-quiet')
}
classpath = sourceSets.main.compileClasspath
include('**/woven/gradle/**')
failOnError false
}
license {
header file('HEADER')
include '**/*.java'
}
checkstyle {
configFile = file('checkstyle.xml')
toolVersion = '8.31'
}
gradlePlugin {
plugins {
woven {
id = 'net.wovenmc.gradle'
description project.description
implementationClass = 'net.wovenmc.woven.gradle.WovenGradlePlugin'
}
}
}
publishing {
publications {
plugin(MavenPublication) {
groupId project.group
artifactId project.archivesBaseName
version project.version
from components['java']
pom {
name = "Woven Gradle Plugin"
description = project.description
}
}
}
repositories {
mavenLocal()
maven {
name 'Woven'
url uri('https://mavenupload.wovenmc.net')
if (project.hasProperty('maven_pass')) {
credentials {
username 'wovenupload'
password((String) project.getProperties().get('maven_pass'))
}
}
}
}
}