-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/gabber235/TypeWriter int…
…o develop
- Loading branch information
Showing
20 changed files
with
517 additions
and
1,125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,2 @@ | ||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.capitalizeAsciiOnly | ||
|
||
plugins { | ||
kotlin("jvm") version "1.9.22" | ||
id("com.github.johnrengelman.shadow") version "8.1.1" | ||
} | ||
|
||
group = "me.gabber235" | ||
version = file("../../version.txt").readText().trim() | ||
|
||
repositories { | ||
// Required | ||
maven("https://jitpack.io") | ||
mavenCentral() | ||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") | ||
maven("https://oss.sonatype.org/content/groups/public/") | ||
maven("https://libraries.minecraft.net/") | ||
maven { url = uri("https://repo.papermc.io/repository/maven-public/") } | ||
// PacketEvents | ||
maven("https://repo.codemc.io/repository/maven-releases/") | ||
// Anvil GUI (Sub dependency of LirandAPI) | ||
maven("https://repo.codemc.io/repository/maven-snapshots/") | ||
maven("https://repo.opencollab.dev/maven-snapshots/") | ||
} | ||
|
||
dependencies { | ||
compileOnly(kotlin("stdlib")) | ||
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT") | ||
|
||
compileOnly("com.github.gabber235:typewriter:$version") | ||
|
||
// Already included in the TypeWriter plugin | ||
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0-RC") | ||
compileOnly("com.github.dyam0:LirandAPI:96cc59d4fb") | ||
compileOnly("com.github.Tofaa2.EntityLib:spigot:2.0.8-SNAPSHOT") | ||
compileOnly("net.kyori:adventure-api:4.15.0") | ||
compileOnly("net.kyori:adventure-text-minimessage:4.15.0") | ||
|
||
// External dependencies | ||
compileOnly("org.geysermc.floodgate:api:2.2.0-SNAPSHOT") | ||
|
||
testImplementation(kotlin("test")) | ||
} | ||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
} | ||
|
||
val targetJavaVersion = 17 | ||
java { | ||
val javaVersion = JavaVersion.toVersion(targetJavaVersion) | ||
sourceCompatibility = javaVersion | ||
targetCompatibility = javaVersion | ||
toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion)) | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { | ||
kotlinOptions { | ||
jvmTarget = "$targetJavaVersion" | ||
} | ||
} | ||
|
||
val copyTemplates by tasks.registering(Copy::class) { | ||
filteringCharset = "UTF-8" | ||
from(projectDir.resolve("src/main/templates")) { | ||
expand("version" to version) | ||
} | ||
into(buildDir.resolve("generated-sources/templates/kotlin/main")) | ||
} | ||
|
||
sourceSets { | ||
main { | ||
java.srcDirs(copyTemplates) | ||
} | ||
} | ||
|
||
|
||
task<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("buildAndMove") { | ||
dependsOn("shadowJar") | ||
|
||
group = "build" | ||
description = "Builds the jar and moves it to the server folder" | ||
outputs.upToDateWhen { false } | ||
|
||
// Move the jar from the build/libs folder to the server/plugins folder | ||
doLast { | ||
val jar = file("build/libs/%s-%s-all.jar".format(project.name, project.version)) | ||
val server = | ||
file("../../plugin/server/plugins/Typewriter/adapters/%s.jar".format(project.name.capitalizeAsciiOnly())) | ||
jar.copyTo(server, overwrite = true) | ||
} | ||
} | ||
|
||
task<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("buildRelease") { | ||
dependsOn("shadowJar") | ||
group = "build" | ||
description = "Builds the jar and renames it" | ||
|
||
doLast { | ||
// Rename the jar to remove the version and -all | ||
val jar = file("build/libs/%s-%s-all.jar".format(project.name, project.version)) | ||
jar.renameTo(file("build/libs/%s.jar".format(project.name))) | ||
file("build/libs/%s-%s.jar".format(project.name, project.version)).delete() | ||
} | ||
} | ||
repositories { } | ||
dependencies { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,109 +1,10 @@ | ||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.capitalizeAsciiOnly | ||
|
||
plugins { | ||
kotlin("jvm") version "1.9.22" | ||
id("com.github.johnrengelman.shadow") version "8.1.1" | ||
} | ||
|
||
group = "me.gabber235" | ||
version = file("../../version.txt").readText().trim() | ||
|
||
repositories { | ||
// Required | ||
maven("https://jitpack.io") | ||
mavenCentral() | ||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") | ||
maven("https://oss.sonatype.org/content/groups/public/") | ||
maven("https://libraries.minecraft.net/") | ||
maven { url = uri("https://repo.papermc.io/repository/maven-public/") } | ||
maven("https://repo.codemc.io/repository/maven-snapshots/") | ||
maven("https://repo.opencollab.dev/maven-snapshots/") | ||
|
||
// Adapter Specific | ||
maven("https://repo.citizensnpcs.co/") | ||
} | ||
|
||
dependencies { | ||
compileOnly(kotlin("stdlib")) | ||
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT") | ||
|
||
compileOnly("com.github.gabber235:typewriter:$version") | ||
|
||
// Already included in the TypeWriter plugin | ||
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0-RC") | ||
compileOnly("com.github.dyam0:LirandAPI:96cc59d4fb") | ||
compileOnly("net.kyori:adventure-api:4.15.0") | ||
compileOnly("net.kyori:adventure-text-minimessage:4.15.0") | ||
compileOnly("io.insert-koin:koin-core:3.4.0") | ||
|
||
// External dependencies | ||
compileOnly("net.citizensnpcs:citizens-main:2.0.33-SNAPSHOT") { | ||
exclude(group = "*", module = "*") | ||
} | ||
|
||
testImplementation(kotlin("test")) | ||
} | ||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
} | ||
|
||
val targetJavaVersion = 17 | ||
java { | ||
val javaVersion = JavaVersion.toVersion(targetJavaVersion) | ||
sourceCompatibility = javaVersion | ||
targetCompatibility = javaVersion | ||
toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion)) | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { | ||
kotlinOptions { | ||
jvmTarget = "$targetJavaVersion" | ||
} | ||
} | ||
|
||
val copyTemplates by tasks.registering(Copy::class) { | ||
filteringCharset = "UTF-8" | ||
from(projectDir.resolve("src/main/templates")) { | ||
expand("version" to version) | ||
} | ||
into(buildDir.resolve("generated-sources/templates/kotlin/main")) | ||
} | ||
|
||
sourceSets { | ||
main { | ||
java.srcDirs(copyTemplates) | ||
} | ||
} | ||
|
||
task<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("buildAndMove") { | ||
dependsOn("shadowJar") | ||
|
||
group = "build" | ||
description = "Builds the jar and moves it to the server folder" | ||
outputs.upToDateWhen { false } | ||
|
||
// Move the jar from the build/libs folder to the server/plugins folder | ||
doLast { | ||
val jar = file("build/libs/%s-%s-all.jar".format(project.name, project.version)) | ||
val server = | ||
file("../../plugin/server/plugins/Typewriter/adapters/%s.jar".format(project.name.capitalizeAsciiOnly())) | ||
jar.copyTo(server, overwrite = true) | ||
} | ||
} | ||
|
||
task<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("buildRelease") { | ||
dependsOn("shadowJar") | ||
group = "build" | ||
description = "Builds the jar and renames it" | ||
|
||
doLast { | ||
// Rename the jar to remove the version and -all | ||
val jar = file("build/libs/%s-%s-all.jar".format(project.name, project.version)) | ||
if (!jar.exists()) { | ||
throw IllegalStateException("Jar does not exist: ${jar.absolutePath}") | ||
} | ||
jar.renameTo(file("build/libs/%s.jar".format(project.name))) | ||
file("build/libs/%s-%s.jar".format(project.name, project.version)).delete() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,8 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
|
||
plugins { | ||
kotlin("jvm") version "1.9.22" | ||
id("com.github.johnrengelman.shadow") version "8.1.1" | ||
} | ||
|
||
group = "me.caleb" | ||
version = file("../../version.txt").readText().trim() | ||
|
||
repositories { | ||
// Required | ||
maven("https://jitpack.io") | ||
mavenCentral() | ||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") | ||
maven("https://oss.sonatype.org/content/groups/public/") | ||
maven("https://libraries.minecraft.net/") | ||
maven { url = uri("https://repo.papermc.io/repository/maven-public/") } | ||
maven("https://repo.codemc.io/repository/maven-snapshots/") | ||
maven("https://repo.opencollab.dev/maven-snapshots/") | ||
|
||
// Adapter Specific | ||
maven("https://nexus.sirblobman.xyz/public/") | ||
} | ||
|
||
dependencies { | ||
compileOnly(kotlin("stdlib")) | ||
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT") | ||
|
||
compileOnly("com.github.gabber235:typewriter:$version") | ||
|
||
// Already included in the TypeWriter plugin | ||
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0-RC") | ||
compileOnly("com.github.dyam0:LirandAPI:96cc59d4fb") | ||
compileOnly("net.kyori:adventure-api:4.15.0") | ||
compileOnly("net.kyori:adventure-text-minimessage:4.15.0") | ||
|
||
// External dependencies | ||
compileOnly("com.github.sirblobman.api:core:2.9-SNAPSHOT") | ||
compileOnly("com.github.sirblobman.combatlogx:api:11.4-SNAPSHOT") | ||
} | ||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
} | ||
|
||
val targetJavaVersion = 17 | ||
java { | ||
val javaVersion = JavaVersion.toVersion(targetJavaVersion) | ||
sourceCompatibility = javaVersion | ||
targetCompatibility = javaVersion | ||
toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion)) | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { | ||
kotlinOptions { | ||
jvmTarget = "$targetJavaVersion" | ||
} | ||
} | ||
|
||
val copyTemplates by tasks.registering(Copy::class) { | ||
filteringCharset = "UTF-8" | ||
from(projectDir.resolve("src/main/templates")) { | ||
expand("version" to version) | ||
} | ||
into(buildDir.resolve("generated-sources/templates/kotlin/main")) | ||
} | ||
|
||
sourceSets { | ||
main { | ||
java.srcDirs(copyTemplates) | ||
} | ||
} | ||
|
||
task<ShadowJar>("buildAndMove") { | ||
dependsOn("shadowJar") | ||
|
||
group = "build" | ||
description = "Builds the jar and moves it to the server folder" | ||
outputs.upToDateWhen { false } | ||
|
||
// Move the jar from the build/libs folder to the server/plugins folder | ||
doLast { | ||
val jar = file("build/libs/%s-%s-all.jar".format(project.name, project.version)) | ||
val server = | ||
file("../../plugin/server/plugins/Typewriter/adapters/%s.jar".format(project.name)) | ||
jar.copyTo(server, overwrite = true) | ||
} | ||
} | ||
|
||
task<ShadowJar>("buildRelease") { | ||
dependsOn("shadowJar") | ||
group = "build" | ||
description = "Builds the jar and renames it" | ||
|
||
doLast { | ||
// Rename the jar to remove the version and -all | ||
val jar = file("build/libs/%s-%s-all.jar".format(project.name, project.version)) | ||
if (!jar.exists()) { | ||
throw IllegalStateException("Jar does not exist: ${jar.absolutePath}") | ||
} | ||
jar.renameTo(file("build/libs/%s.jar".format(project.name))) | ||
file("build/libs/%s-%s.jar".format(project.name, project.version)).delete() | ||
} | ||
} |
Oops, something went wrong.