-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
124 lines (102 loc) · 2.87 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
import net.neoforged.gradleutils.PomUtilsExtension
plugins {
id 'java'
id 'groovy'
id 'maven-publish'
id 'org.cadixdev.licenser' version '0.6.1'
id 'net.neoforged.gradleutils' version '3.0.0-alpha.4'
}
group = 'net.neoforged'
version = gradleutils.version
gradleutils {
setupSigning()
setupCentralPublishing()
}
sourceSets {
runtime {}
base {}
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(8)
withJavadocJar()
withSourcesJar()
registerFeature('runtime') {
usingSourceSet(sourceSets.runtime)
withJavadocJar()
withSourcesJar()
}
registerFeature('base') {
usingSourceSet(sourceSets.base)
withJavadocJar()
withSourcesJar()
}
}
changelog {
from '1.0'
}
repositories {
mavenCentral()
}
license {
header = file('LICENSE-header')
include '**/*.java'
include '**/*.groovy'
}
dependencies {
implementation sourceSets.runtime.output
implementation gradleApi()
runtimeImplementation gradleApi()
baseImplementation gradleApi()
baseApi(project(":")) {
capabilities {
requireCapability("net.neoforged:groovydslimprover-runtime")
}
}
baseApi(project(":"))
compileOnly 'org.jetbrains:annotations:24.0.0'
testImplementation 'org.mockito:mockito-core:4.11.0'
testImplementation 'org.mockito:mockito-junit-jupiter:4.11.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
}
tasks.withType(Jar).configureEach {
manifest.attributes([
'Specification-Title' : 'GroovyDSLImprover',
'Specification-Vendor' : 'neoforged',
'Implementation-Title' : project.name,
'Implementation-Version': project.version,
'Implementation-Vendor' : 'neoforged',
'Git-Commit' : gradleutils.gitInfo.abbreviatedId
])
}
tasks.withType(GroovyCompile).configureEach {
options.incremental = true
groovyOptions.optimizationOptions.indy = true
}
test {
useJUnitPlatform()
}
publishing {
publications {
register('mavenJava', MavenPublication) {
from components.java
gradleutils.sign(it)
pom {
name = 'GroovyDSLImprover'
description = 'Groovy Compiler Plugin to improve building Groovy based DSLs, like those used in Gradle.'
pomUtils.license(it, PomUtilsExtension.License.LGPL_v2)
pomUtils.githubRepo(it, 'GroovyDSLImprover')
developers {
developer {
id = 'matyrobbrt'
name = 'matyrobbrt'
}
}
}
}
}
repositories {
maven gradleutils.publishingMaven
}
}
tasks.assemble.dependsOn(tasks.withType(Jar))