Skip to content

Commit

Permalink
feat: add gradle lombok plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Silthus authored Nov 17, 2020
1 parent 2226109 commit d2468bf
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ buildscript {
plugins {
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'kr.entree.spigradle' version '2.2.3'
id 'io.freefair.lombok' version '5.3.0'
id 'java'
id 'jacoco'
id 'idea'
}

apply from: "$rootDir/gradle/jacoco.gradle"
apply from: "$rootDir/gradle/publish.gradle"

sourceCompatibility = 8
targetCompatibility = 8
if (project.hasProperty("local_script")) {
apply from: file(local_script + "/build.local.gradle")
}

sourceCompatibility = 11
targetCompatibility = 11

ext {
mcVersion = project.property("mcVersion")
Expand Down Expand Up @@ -44,27 +50,11 @@ archivesBaseName = project.property("pluginName")
repositories {
mavenCentral()
jcenter()

spigot()
// bungeecord()
// paper()
// protocolLib()
// enginehub()

maven {
name = 'github'
url = 'https://maven.pkg.github.com/Silthus'
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
maven { url = 'https://jitpack.io' }
}

dependencies {
compileOnly lombok()
annotationProcessor lombok()

compileOnly spigot(mcVersion)

//Add dependencies here
Expand All @@ -74,8 +64,6 @@ dependencies {
testImplementation "org.mockito:mockito-core:3.+"
testImplementation mockBukkit()
testImplementation 'org.assertj:assertj-core:3.+'
testImplementation lombok()
testAnnotationProcessor lombok()
}

shadowJar {
Expand All @@ -89,6 +77,7 @@ shadowJar {

tasks.build.dependsOn(shadowJar)
tasks.publish.dependsOn(shadowJar)
tasks.prepareSpigotPlugins.dependsOn(shadowJar)

test {
useJUnitPlatform()
Expand All @@ -103,4 +92,4 @@ processResources {
expand project.properties
}

defaultTasks 'build'
defaultTasks 'build'

0 comments on commit d2468bf

Please sign in to comment.