diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa3b5b4..7b17158 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,3 +3,19 @@ include: ref: 'main' file: 'ci-templates/gradle_java.yml' + +deploy: + stage: deploy + tags: + - dind + script: + - echo "Building with gradle version ${BUILDVERSION}" + - gradle -Pversion=${BUILDVERSION} publish + - echo "BUILDVERSION=$BUILDVERSION" >> version.env + artifacts: + reports: + dotenv: version.env + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_COMMIT_BRANCH =~ /^release/ + - if: $CI_COMMIT_TAG \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 571816e..eb68bb8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -26,7 +26,6 @@ repositories { dependencies { api("org.projectlombok:lombok:1.18.30") - api("org.springframework.boot:spring-boot-configuration-processor:3.2.2") api("com.google.guava:guava:33.0.0-jre") api("com.pdftron:PDFNet:10.3.0") testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") @@ -43,7 +42,7 @@ java.targetCompatibility = JavaVersion.VERSION_17 publishing { publications { - create(name) { + create("mavenJava") { from(components["java"]) } } @@ -58,6 +57,11 @@ publishing { } } +tasks.withType { + onlyIf { publication.name == "mavenJava" } +} + + pmd { isConsoleOutput = true }