plugins { id("java-library") id("maven-publish") id("com.gradleup.shadow") version "8.3.6" } group = "cn.hamster3.mc.plugin" version = "1.4.0" description = "叁只仓鼠的 Minecraft 插件开发通用工具包" subprojects { apply { plugin("java-library") plugin("maven-publish") plugin("com.gradleup.shadow") } group = rootProject.group version = rootProject.version description = rootProject.description repositories { maven("https://maven.airgame.net/maven-public") } dependencies { // https://mvnrepository.com/artifact/org.jetbrains/annotations compileOnly("org.jetbrains:annotations:24.1.0") // https://mvnrepository.com/artifact/org.projectlombok/lombok compileOnly("org.projectlombok:lombok:1.18.30") annotationProcessor("org.projectlombok:lombok:1.18.30") } java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 withSourcesJar() } tasks { processResources { filesMatching("update.yml") { expand(rootProject.properties) } } withType { options.encoding = "UTF-8" } withType { from(rootProject.file("LICENSE")) duplicatesStrategy = DuplicatesStrategy.EXCLUDE } build { dependsOn(shadowJar) } } publishing { publications { create("mavenJava") { from(components["java"]) } } repositories { maven { url = uri("https://maven.airgame.net/public") credentials { username = findProperty("MAVEN_AIRGAME_USERNAME")?.toString() ?: "" password = findProperty("MAVEN_AIRGAME_PASSWORD")?.toString() ?: "" } } } } }