2024-06-28 01:08:45 +02:00
|
|
|
/*
|
|
|
|
* STAROPENSOURCE ENGINE SOURCE FILE
|
|
|
|
* Copyright (c) 2024 The StarOpenSource Engine Contributors
|
|
|
|
* Licensed under the GNU Affero General Public License v3
|
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2024-06-08 15:33:03 +02:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2024-06-08 17:37:02 +02:00
|
|
|
id 'io.freefair.lombok' version "${pluginLombok}"
|
2024-06-28 18:21:59 +02:00
|
|
|
id "com.gorylenko.gradle-git-properties" version "${pluginGitProperties}"
|
2024-06-16 13:36:06 +02:00
|
|
|
id 'maven-publish'
|
2024-06-08 15:33:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-06-09 00:21:01 +02:00
|
|
|
// -> Runtime <-
|
2024-06-08 15:33:03 +02:00
|
|
|
// Lombok
|
|
|
|
compileOnly 'org.projectlombok:lombok:' + project.dependencyLombok
|
|
|
|
annotationProcessor 'org.projectlombok:lombok:' + project.dependencyLombok
|
|
|
|
|
2024-06-09 00:21:01 +02:00
|
|
|
// JetBrains Annotations
|
2024-06-08 15:33:03 +02:00
|
|
|
compileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations
|
|
|
|
|
|
|
|
// ANSI support
|
|
|
|
implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi
|
2024-06-09 00:21:01 +02:00
|
|
|
|
2024-06-09 19:05:30 +02:00
|
|
|
// Reflections
|
|
|
|
implementation 'org.reflections:reflections:' + project.dependencyReflections
|
|
|
|
|
2024-06-09 00:21:01 +02:00
|
|
|
// -> Testing <-
|
|
|
|
// Jetbrains Annotations
|
|
|
|
testCompileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations
|
|
|
|
|
|
|
|
// JUnit
|
2024-06-09 16:31:11 +02:00
|
|
|
testImplementation platform('org.junit:junit-bom:5.' + project.dependencyJunit)
|
2024-06-09 14:17:03 +02:00
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter'
|
|
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
2024-06-09 00:21:01 +02:00
|
|
|
|
|
|
|
// jOOR
|
2024-06-09 16:31:11 +02:00
|
|
|
testImplementation 'org.jooq:joor:' + project.dependencyJoor
|
2024-06-08 15:33:03 +02:00
|
|
|
}
|
|
|
|
|
2024-06-28 18:21:59 +02:00
|
|
|
gitProperties {
|
|
|
|
dotGitDirectory = file("${rootProject.rootDir}/.git")
|
|
|
|
failOnNoGitDirectory = false
|
|
|
|
extProperty = 'gitProps'
|
|
|
|
|
|
|
|
dateFormat = "yyyy-MM-dd'T'HH:mmZ"
|
|
|
|
dateFormatTimeZone = "UTC"
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.register("writeGitProperties") {
|
|
|
|
doLast {
|
|
|
|
File target = file("${project.projectDir}/src/main/resources/git.properties")
|
|
|
|
File source = file("${project.projectDir}/build/resources/main/git.properties")
|
|
|
|
|
|
|
|
target.delete()
|
|
|
|
source.renameTo(target)
|
|
|
|
}
|
|
|
|
|
|
|
|
outputs.upToDateWhen { false }
|
|
|
|
}
|
|
|
|
generateGitProperties.outputs.upToDateWhen { false }
|
|
|
|
processResources.dependsOn 'writeGitProperties'
|
|
|
|
|
2024-06-08 15:33:03 +02:00
|
|
|
javadoc.options {
|
|
|
|
setMemberLevel(JavadocMemberLevel.PUBLIC)
|
|
|
|
setOverview("src/main/javadoc/overview.html")
|
2024-06-09 00:21:01 +02:00
|
|
|
setLocale("en_US")
|
2024-06-08 15:33:03 +02:00
|
|
|
setJFlags([
|
|
|
|
// Force Javadoc to use English translations
|
|
|
|
"-Duser.language=en_US"
|
|
|
|
])
|
|
|
|
}
|
2024-06-09 00:21:01 +02:00
|
|
|
|
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
testLogging {
|
|
|
|
events "passed", "skipped", "failed"
|
|
|
|
}
|
|
|
|
}
|
2024-06-16 13:36:06 +02:00
|
|
|
|
|
|
|
publishing {
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name = "staropensource"
|
|
|
|
url = uri("https://mvn.staropensource.de/sosengine")
|
|
|
|
credentials(org.gradle.api.credentials.PasswordCredentials)
|
|
|
|
authentication {
|
|
|
|
//noinspection GroovyAssignabilityCheck
|
|
|
|
basic (BasicAuthentication)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
publications {
|
|
|
|
//noinspection GroovyAssignabilityCheck
|
|
|
|
maven (MavenPublication) {
|
|
|
|
groupId = group
|
|
|
|
artifactId = "base"
|
|
|
|
version = version
|
|
|
|
//noinspection GroovyAssignabilityCheck
|
|
|
|
from components.java
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|