Skip to content

Commit

Permalink
Merge pull request Micalhl#13 from InsinuateProjects/master
Browse files Browse the repository at this point in the history
引入洛神云nexus publish,以便开发者自由下载依赖
  • Loading branch information
Micalhl authored Aug 29, 2021
2 parents 469a4b4 + a4aecd0 commit 150d4ef
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
plugins {
`maven-publish`
id("java")
id("io.izzel.taboolib") version "1.18"
id("io.izzel.taboolib") version "1.26"
id("org.jetbrains.kotlin.jvm") version "1.5.10"
id("com.github.johnrengelman.shadow") version "7.0.0"
}

group = "me.arasple.mc.trhologram"
Expand Down Expand Up @@ -41,7 +43,7 @@ repositories {
mavenCentral()
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://repo.codemc.org/repository/maven-public/")
maven("https://repo.mcage.cn/repository/maven-releases/")
maven("https://repo.iroselle.com/repository/maven-releases/")
}

dependencies {
Expand All @@ -55,3 +57,43 @@ dependencies {
compileOnly("me.arasple:TrMenu:3.0-PRE-20:pure")
compileOnly(fileTree("libs"))
}


tasks.shadowJar {
dependencies {
taboolib.modules.forEach { exclude(dependency("io.izzel:taboolib:${taboolib.version}:$it")) }
exclude(dependency("com.google.code.gson:gson:2.8.6"))
exclude(dependency("org.bstats:bstats-bukkit:1.5"))

exclude("data")
exclude("META-INF/*.kotlin_module")
exclude("META-INF/maven")
exclude("lang")
exclude("holograms")
exclude("*.yml")
}
relocate("taboolib", "${project.group}.taboolib")
archiveClassifier.set("pure")
}

configure<PublishingExtension> {
publications {
create<MavenPublication>("shadow") {
shadow.component(this)
groupId = "me.arasple"
}
}
repositories {
maven {
url = uri("https://repo.iroselle.com/repository/maven-releases/")
credentials {
file("access.txt").also {
if (!it.exists()) return@credentials
}.readLines().apply {
username = this[0]
password = this[1]
}
}
}
}
}

0 comments on commit 150d4ef

Please sign in to comment.