Skip to content

Commit

Permalink
6.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Bkm016 committed Jan 26, 2024
1 parent 381e690 commit 86e2a61
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# Building
# TabooLib SDK

* [Gradle](https://gradle.org/) - Dependency Management
## 构建发行版本

The GradleWrapper in included in this project.

**Windows:**
发行版本用于正常使用, 不含 TabooLib 本体。

```
gradlew.bat clean build
./gradlew clean build
```

**macOS/Linux:**
## 构建开发版本

```
./gradlew clean build
```
开发版本包含 TabooLib 本体, 用于开发者使用, 但不可运行。

Build artifacts should be found in `./build/libs` folder.
```
./gradlew clean build -Papi
```
30 changes: 21 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
java
id("io.izzel.taboolib") version "1.42"
id("org.jetbrains.kotlin.jvm") version "1.5.31"
id("io.izzel.taboolib") version "2.0.0"
id("org.jetbrains.kotlin.jvm") version "1.8.22"
}

taboolib {
install("common")
install("platform-bukkit")
classifier = null
version = "6.0.9-114"
version { taboolib = "6.1.0" }
}

repositories {
mavenCentral()
}

dependencies {
compileOnly("ink.ptms.core:v11701:11701:mapped")
compileOnly("ink.ptms.core:v11701:11701:universal")
compileOnly("ink.ptms.core:v12004:12004:mapped")
compileOnly("ink.ptms.core:v12004:v12004:universal")
compileOnly(kotlin("stdlib"))
compileOnly(fileTree("libs"))
}
Expand All @@ -26,7 +25,7 @@ tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xjvm-default=all")
Expand All @@ -37,3 +36,16 @@ configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

// 用于开发模式,删除本地缓存
tasks.register("refreshDependencies") {
doLast {
val taboolibFile = File("../../caches/modules-2/files-2.1/io.izzel.taboolib").canonicalFile
taboolibFile.listFiles()?.forEach { module ->
val file = File(taboolibFile, "${module.name}/${taboolib.version.taboolib}")
if (file.exists()) {
file.deleteRecursively()
}
}
}
}

0 comments on commit 86e2a61

Please sign in to comment.