This commit is contained in:
2024-08-04 22:15:46 +02:00
parent 4598b67244
commit 881e89b061
+17 -7
View File
@@ -17,6 +17,7 @@
* 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
@@ -49,6 +50,9 @@ plugins {
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()
@@ -74,14 +78,20 @@ allprojects {
}
}
maven {
url = URI("https://steamwar.de/maven/")
credentials {
val swProps = Properties()
swProps.load(rootProject.file("steamwar.properties").inputStream())
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")
username = swProps.getProperty("maven.username")
password = swProps.getProperty("maven.password")
}
}
}