- ビルド設定の変更:minimizeとJarの作成とファイル名の反映
- 依存関係のリモート化:submoduleとして追加し、includeBuildのパスを内部化
This commit is contained in:
Keisuke Hirata 2025-11-29 04:20:26 +09:00
parent 8b69ad484d
commit 54a71bab9a
8 changed files with 11 additions and 34 deletions

View File

@ -1,19 +0,0 @@
#!/usr/bin/env bash
set -e
if [[ ! -d "/home/hare/Projects/crafters-toolbox/components/plugins/kommand-lib" ]]; then
echo "Cannot find source directory; Did you move it?"
echo "(Looking for "/home/hare/Projects/crafters-toolbox/components/plugins/kommand-lib")"
echo 'Cannot force reload with this script - use "direnv reload" manually and then try again'
exit 1
fi
# rebuild the cache forcefully
_nix_direnv_force_reload=1 direnv exec "/home/hare/Projects/crafters-toolbox/components/plugins/kommand-lib" true
# Update the mtime for .envrc.
# This will cause direnv to reload again - but without re-building.
touch "/home/hare/Projects/crafters-toolbox/components/plugins/kommand-lib/.envrc"
# Also update the timestamp of whatever profile_rc we have.
# This makes sure that we know we are up to date.
touch -r "/home/hare/Projects/crafters-toolbox/components/plugins/kommand-lib/.envrc" "/home/hare/Projects/crafters-toolbox/components/plugins/kommand-lib/.direnv"/*.rc

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
.direnv
.kotlin
.gradle
build

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "permits-lib"]
path = permits-lib
url = git@gitea.hareworks.net:Hare/permits-lib.git

View File

@ -17,17 +17,16 @@ val exposedVersion = "1.0.0-rc-3"
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT")
compileOnly("org.jetbrains.kotlin:kotlin-stdlib")
implementation("org.jetbrains.kotlin:kotlin-stdlib")
compileOnly("net.hareworks:permits-lib:1.1")
}
tasks {
withType<Jar> {
archiveBaseName.set("Kommand-Lib")
}
shadowJar {
minimize()
archiveBaseName.set("Kommand-Lib")
archiveClassifier.set("")
}
jar {
enabled = false
archiveClassifier.set("min")
}
}

View File

@ -36,10 +36,6 @@
export PATH="$JAVA_HOME/bin:$PATH"
export GRADLE_USER_HOME="$PWD/.gradle"
echo "Loaded Minecraft dev env (JDK 21 + Gradle)"
java -version || true
gradle --version || true
'';
};
}

View File

@ -1,6 +1,3 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
org.gradle.configuration-cache=true
org.gradle.parallel=true
org.gradle.caching=true

1
permits-lib Submodule

@ -0,0 +1 @@
Subproject commit 6c2f860df64824d8b52d0083f91a305c7b7d7d08

View File

@ -1,3 +1,3 @@
rootProject.name = "kommand-lib"
includeBuild("../permits-lib")
includeBuild("permits-lib")