122 lines
3.5 KiB
Kotlin
122 lines
3.5 KiB
Kotlin
/*
|
|
* This file is a part of the SteamWar software.
|
|
*
|
|
* Copyright (C) 2024 SteamWar.de-Serverteam
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
import org.codehaus.plexus.util.Os
|
|
import java.net.URI
|
|
import java.util.Properties
|
|
|
|
/*
|
|
* This file is a part of the SteamWar software.
|
|
*
|
|
* Copyright (C) 2024 SteamWar.de-Serverteam
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
plugins {
|
|
id("base")
|
|
id("application")
|
|
|
|
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
|
}
|
|
|
|
group = "de.steamwar"
|
|
version = ""
|
|
|
|
private val isInCi by lazy { Os.isFamily(Os.FAMILY_UNIX) && ProcessBuilder("hostname").start().inputStream.bufferedReader().readText().startsWith("steamwar.de") }
|
|
|
|
allprojects {
|
|
repositories {
|
|
mavenCentral()
|
|
|
|
maven {
|
|
url = URI("https://m2.dv8tion.net/releases")
|
|
content {
|
|
includeGroup("net.dv8tion")
|
|
}
|
|
}
|
|
|
|
maven {
|
|
url = URI("https://repo.lunarclient.dev")
|
|
content {
|
|
includeGroup("com.lunarclient")
|
|
}
|
|
}
|
|
|
|
if (isInCi) {
|
|
maven {
|
|
url = URI("file:///var/www/html/maven/")
|
|
}
|
|
} else {
|
|
maven {
|
|
url = URI("https://steamwar.de/maven/")
|
|
credentials {
|
|
val swProps = Properties()
|
|
swProps.load(rootProject.file("steamwar.properties").inputStream())
|
|
|
|
username = swProps.getProperty("maven.username")
|
|
password = swProps.getProperty("maven.password")
|
|
}
|
|
}
|
|
}
|
|
|
|
maven {
|
|
url = URI("https://repo.codemc.io/repository/maven-snapshots/")
|
|
}
|
|
|
|
maven {
|
|
url = URI("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
|
}
|
|
|
|
maven {
|
|
url = URI("https://libraries.minecraft.net")
|
|
}
|
|
|
|
maven {
|
|
url = URI("https://repo.viaversion.com")
|
|
}
|
|
|
|
maven {
|
|
url = URI("https://repo.papermc.io/repository/maven-public/")
|
|
}
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDirs()
|
|
}
|
|
resources {
|
|
srcDirs()
|
|
}
|
|
}
|
|
}
|