Skip to content

Commit

Permalink
GH-29 Change Gradle dsl to Kotlin (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
zrdzn authored Apr 10, 2023
1 parent f6020b6 commit 93f41df
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 65 deletions.
32 changes: 0 additions & 32 deletions build.gradle

This file was deleted.

37 changes: 37 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
plugins {
id("java")
id("com.github.johnrengelman.shadow") version "7.1.2"
}

allprojects {
group = "io.github.zrdzn.minecraft"
version = "1.4.2-SNAPSHOT"
}

subprojects {
apply(plugin = "java")
apply(plugin = "com.github.johnrengelman.shadow")

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}

repositories {
mavenCentral()

maven {
name = "spigot-repository"
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}

maven {
name = "sonatype-repository"
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}
}
}
24 changes: 0 additions & 24 deletions plugin/build.gradle

This file was deleted.

26 changes: 26 additions & 0 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

repositories {
mavenCentral()
}

dependencies {
implementation(project(":spigot"))
implementation(project(":v1_8"))
implementation(project(":v1_12"))
implementation(project(":v1_13"))

compileOnly("org.spigotmc:spigot-api:1.8-R0.1-SNAPSHOT")

implementation("dev.triumphteam:triumph-gui:3.1.4")
}

java {
withSourcesJar()
}

tasks.withType<ShadowJar> {
archiveFileName.set("LovelyDrop v${project.version}.jar")

relocate("dev.triumphteam.gui", "io.github.zrdzn.minecraft.lovelydrop.gui")
}
3 changes: 0 additions & 3 deletions spigot/build.gradle

This file was deleted.

3 changes: 3 additions & 0 deletions spigot/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependencies {
compileOnly("org.spigotmc:spigot-api:1.8-R0.1-SNAPSHOT")
}
2 changes: 1 addition & 1 deletion v1_12/build.gradle → v1_12/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
compileOnly(project(":spigot"))
compileOnly(project(":v1_8"))
compileOnly "org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT"
compileOnly("org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT")
}
2 changes: 1 addition & 1 deletion v1_13/build.gradle → v1_13/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
compileOnly(project(":spigot"))
compileOnly(project(":v1_12"))
compileOnly "org.spigotmc:spigot-api:1.13-R0.1-SNAPSHOT"
compileOnly("org.spigotmc:spigot-api:1.13-R0.1-SNAPSHOT")
}
4 changes: 0 additions & 4 deletions v1_8/build.gradle

This file was deleted.

4 changes: 4 additions & 0 deletions v1_8/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dependencies {
compileOnly(project(":spigot"))
compileOnly("org.spigotmc:spigot-api:1.8-R0.1-SNAPSHOT")
}

0 comments on commit 93f41df

Please sign in to comment.