mirror of
https://github.moeyy.xyz/https://github.com/GeWuYou/forgeboot
synced 2025-10-28 02:36:39 +08:00
build: Add Gitea Private Repository Support
- Added support for Gitea private repository in repositories.gradle.kts - Configure the private repository address through the environment variable GEWUYOU_GITEA_HOST - Update build.gradle.kts, optimize project configuration structure - adjust publishing configuration, remove redundant code
This commit is contained in:
parent
beacb9c856
commit
c89f1f1737
@ -75,9 +75,8 @@ subprojects {
|
|||||||
from(file("$configDir/repositories.gradle.kts"))
|
from(file("$configDir/repositories.gradle.kts"))
|
||||||
// 导入源代码任务
|
// 导入源代码任务
|
||||||
from(file("$tasksDir/sourceTask.gradle.kts"))
|
from(file("$tasksDir/sourceTask.gradle.kts"))
|
||||||
// // 导入发布配置
|
|
||||||
// from(file("$configDir/publishing.gradle.kts"))
|
|
||||||
}
|
}
|
||||||
|
//region publishing
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
@ -127,8 +126,8 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
//endregion
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -145,9 +144,6 @@ subprojects {
|
|||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
fun Project.getPropertyByBoolean(key: String): Boolean {
|
fun Project.getPropertyByBoolean(key: String): Boolean {
|
||||||
return properties[key]?.toString()?.toBoolean() ?: false
|
return properties[key]?.toString()?.toBoolean() ?: false
|
||||||
}
|
}
|
||||||
@ -1,6 +1,13 @@
|
|||||||
// This file is used to define the repositories used by the project.
|
// This file is used to define the repositories used by the project.
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
val host = System.getenv("GEWUYOU_GITEA_HOST")
|
||||||
|
host?.let {
|
||||||
|
maven{
|
||||||
|
url = uri("http://${host}/api/packages/gewuyou/maven")
|
||||||
|
isAllowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
maven {
|
maven {
|
||||||
url = uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev")
|
url = uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user