qodo/build.gradle
2024-10-11 15:38:44 +02:00

78 lines
2.3 KiB
Groovy

plugins {
id 'java'
id 'io.quarkus'
id 'maven-publish' // [Maven] Publish - https://docs.gradle.org/current/userguide/publishing_maven.html
}
repositories {
maven { url='https://maven.doap.fr/repository/maven-all/' }
mavenCentral()
mavenLocal()
}
dependencies {
implementation 'com.h2database:h2:2.3.232'
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation 'io.quarkus:quarkus-rest'
implementation 'io.quarkus:quarkus-jdbc-h2'
implementation 'io.quarkus:quarkus-rest-jackson'
implementation 'io.quarkus:quarkus-hibernate-orm-panache'
implementation 'io.quarkus:quarkus-arc'
implementation 'io.quarkus:quarkus-hibernate-orm'
implementation 'io.quarkus:quarkus-oidc'
/*
implementation 'io.quarkus:quarkus-rest-client-oidc-token-propagation'
implementation 'io.quarkus:quarkus-rest-client-oidc-filter'
*/
testImplementation 'io.quarkus:quarkus-junit5'
testImplementation 'io.rest-assured:rest-assured'
}
group 'fr.doap.qodo'
version '1.0.0-SNAPSHOT'
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
test {
systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager"
}
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-parameters'
}
compileTestJava {
options.encoding = 'UTF-8'
}
// [Maven Publish] - https://docs.gradle.org/current/userguide/publishing_maven.html
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
repositories {
maven {
if ((System.getenv('MAVEN_USERNAME') == null) || (System.getenv('MAVEN_PASSWORD') == null)) {
throw new GradleException("You must define the Windows Environment variables MAVEN_USERNAME and MAVEN_PASSWORD to publish to the repository")
}
def releasesRepoUrl = "https://maven.doap.fr/repository/maven-releases/"
def snapshotsRepoUrl = "https://maven.doap.fr/repository/maven-snapshots/"
url = version.endsWith('-SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username System.getenv('MAVEN_USERNAME')
password System.getenv('MAVEN_PASSWORD')
}
}
}
}