-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
118 lines (98 loc) · 3.09 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
plugins {
alias(libs.plugins.spongeConvention) apply false
alias(libs.plugins.indra.sonatype)
alias(libs.plugins.errorprone)
alias(libs.plugins.eclipseApt)
id('java-library')
id("org.gradlex.extra-java-module-info") version "1.9"
}
// Default tasks
defaultTasks 'spotlessApply', 'build'
// Basic project information
group = "org.spongepowered"
extraJavaModuleInfo {
deriveAutomaticModuleNamesFromFileNames = true
module("com.google.errorprone:javac-shaded", "com.google.errorprone.javac.shaded") {
exports("com.google.errorprone.javac.shaded")
}
module("org.jooq:joor-java-8", "org.jooq.joor") {
exports("org.joor")
}
}
allprojects {
apply plugin: "org.spongepowered.gradle.sponge.dev"
apply plugin: "net.kyori.indra.publishing"
apply plugin: "net.ltgt.errorprone"
apply plugin: "com.diffplug.eclipse.apt"
apply plugin: "java-library"
apply plugin: "eclipse"
dependencies {
errorprone libs.errorprone
}
eclipse {
synchronizationTasks eclipseJdtApt, eclipseJdt, eclipseFactorypath
}
tasks.withType(JavaCompile).configureEach {
options.errorprone.disableWarningsInGeneratedCode = true
options.compilerArgs << '--module-version' << project.version
}
spongeConvention {
repository("event-impl-gen") {
ci = true
publishing = true
}
mitLicense()
licenseParameters {
organization = rootProject.organization
url = rootProject.url
}
sharedManifest {
indraGit.applyVcsInformationToManifest(it)
attributes(
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Implementation-Vendor": project.url
)
}
}
indra {
javaVersions {
minimumToolchain(21)
target(21)
}
configurePublications {
artifactId(project.name.toLowerCase())
}
}
indraSpotlessLicenser {
property("name", rootProject.projectName)
}
// tasks.withType(JavaCompile).configureEach {
// options.forkOptions.jvmArgs = [
// '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005'
// ]
// }
}
// Project dependencies
dependencies {
implementation project(":event-impl-gen-annotations")
api libs.javapoet
api libs.javaxInject
api libs.jakartaInject
compileOnlyApi libs.errorprone.annotations
api(libs.dagger.runtime)
annotationProcessor libs.dagger.compiler
compileOnlyApi libs.autoService.annotations
annotationProcessor libs.autoService
compileOnlyApi libs.jetbrainsAnnotations
// Tests
testImplementation libs.assertj
testImplementation libs.joor
testImplementation libs.mockito.core
testImplementation libs.mockito.jupiter
testImplementation platform(libs.junit.bom)
testImplementation libs.junit.api
testImplementation libs.junit.params
testRuntimeOnly libs.junit.engine
testRuntimeOnly libs.junit.launcher
}