Add the lombok Gradle plugin & run delombok

`delombok` is ran only when generating JavaDocs due to how `@__` was introduced into the project
This commit is contained in:
KingRainbow44 2023-01-15 03:13:39 -05:00
parent 8a5a6ab83e
commit 1f99911305
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE

View File

@ -34,6 +34,9 @@ plugins {
// Maven
id 'maven-publish'
id 'signing'
// Lombok for delombok'ification
id "io.freefair.lombok" version "6.6.1"
}
compileJava.options.encoding = "UTF-8"
@ -43,7 +46,7 @@ sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
group = 'xyz.grasscutters'
version = '1.4.5-dev'
version = '1.4.5'
sourceCompatibility = 17
targetCompatibility = 17
@ -113,7 +116,6 @@ application {
getMainClass().set('emu.grasscutter.Grasscutter')
}
jar {
exclude '*.proto'
@ -205,11 +207,17 @@ clean {
}
protobuf {
generateProtoTasks {
all().each { task ->
task.enabled = false
}
}
protoc {
// The artifact spec for the Protobuf Compiler
artifact = 'com.google.protobuf:protoc:3.18.1'
}
// generatedFilesBaseDir = "$projectDir/src/main/java/emu/grasscutter/net/proto/"
generatedFilesBaseDir = "$projectDir/src/generated/"
}
@ -253,6 +261,8 @@ javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
source = delombok
}
task injectGitHash {