blob: 374b6279e7de1257361cde11374d24dfab6050de [file] [log] [blame]
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +01001plugins {
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +01002 id 'java'
3 id 'io.quarkus'
Matthias Andreas Benkardf7bf7c42020-01-28 22:31:12 +01004 id "com.bmuschko.docker-remote-api" version "${dockerPluginVersion}"
Matthias Andreas Benkardf611d9e2020-01-13 05:04:52 +01005 id "com.diffplug.gradle.spotless" version "${spotlessPluginVersion}"
6 id "com.github.ben-manes.versions" version "${versionsPluginVersion}"
7 id "se.patrikerdes.use-latest-versions" version "${useLatestVersionsPluginVersion}"
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +01008}
9
Matthias Andreas Benkard513deee2020-01-12 20:58:56 +010010sourceCompatibility = 11
11targetCompatibility = 11
12
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +010013repositories {
14 mavenLocal()
15 mavenCentral()
16}
17
Matthias Andreas Benkardf611d9e2020-01-13 05:04:52 +010018tasks {
19 dependencyUpdates {
20 checkConstraints = true
21 gradleReleaseChannel = "current"
22 revision = "release"
23 }
24}
25
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +010026dependencies {
27 implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
28
29 implementation 'io.quarkus:quarkus-agroal'
Matthias Andreas Benkardc27d1cb2020-01-26 11:11:24 +010030 implementation 'io.quarkus:quarkus-elytron-security-properties-file'
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +010031 implementation 'io.quarkus:quarkus-flyway'
32 implementation 'io.quarkus:quarkus-hibernate-orm-panache'
33 implementation 'io.quarkus:quarkus-hibernate-validator'
34 implementation 'io.quarkus:quarkus-jdbc-postgresql'
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +010035 implementation 'io.quarkus:quarkus-kubernetes'
36 implementation 'io.quarkus:quarkus-mailer'
Matthias Andreas Benkard24a25142020-01-24 13:25:54 +010037 implementation 'io.quarkus:quarkus-oidc'
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +010038 implementation 'io.quarkus:quarkus-resteasy'
39 implementation 'io.quarkus:quarkus-resteasy-jsonb'
40 implementation 'io.quarkus:quarkus-resteasy-qute'
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +010041 implementation 'io.quarkus:quarkus-scheduler'
Matthias Andreas Benkarde5f81e52020-01-18 12:48:40 +010042
43 //implementation 'io.quarkus:quarkus-elytron-security'
44 //implementation 'io.quarkus:quarkus-elytron-security-jdbc'
45 //implementation 'io.quarkus:quarkus-elytron-security-oauth2'
46 //implementation 'io.quarkus:quarkus-keycloak-authorization'
Matthias Andreas Benkarde5f81e52020-01-18 12:48:40 +010047 //implementation 'io.quarkus:quarkus-quartz'
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +010048 //implementation 'io.quarkus:quarkus-smallrye-fault-tolerance'
49 //implementation 'io.quarkus:quarkus-smallrye-health'
50 //implementation 'io.quarkus:quarkus-smallrye-metrics'
51 //implementation 'io.quarkus:quarkus-smallrye-openapi'
52
53 //implementation 'jakarta.transaction:jakarta.transaction-api'
54 //implementation 'org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.3_spec'
55 //implementation 'jakarta.persistence:jakarta.persistence-api'
56
Matthias Andreas Benkard5d71a9e2020-01-18 12:31:26 +010057 implementation 'org.mapstruct:mapstruct'
58 compileOnly 'org.mapstruct:mapstruct-processor'
59
60 compileOnly 'com.google.code.findbugs:jsr305'
61
Matthias Andreas Benkardf611d9e2020-01-13 05:04:52 +010062 implementation 'com.vladmihalcea:hibernate-types-52'
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +010063
Matthias Andreas Benkard5d71a9e2020-01-18 12:31:26 +010064 implementation "jakarta.security.jacc:jakarta.security.jacc-api"
65 implementation "net.java.dev.jna:jna"
66
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +010067 testImplementation 'io.quarkus:quarkus-junit5'
68 testImplementation 'io.rest-assured:rest-assured'
Matthias Andreas Benkardf611d9e2020-01-13 05:04:52 +010069
Matthias Andreas Benkard4e29a242020-01-25 05:38:27 +010070 implementation 'org.jsoup:jsoup:1.12.1'
71
Matthias Andreas Benkardf611d9e2020-01-13 05:04:52 +010072 constraints {
Matthias Andreas Benkardf611d9e2020-01-13 05:04:52 +010073 implementation "com.vladmihalcea:hibernate-types-52:${hibernateTypesVersion}"
Matthias Andreas Benkard5d71a9e2020-01-18 12:31:26 +010074 implementation "org.mapstruct:mapstruct:${mapstructVersion}"
75 compileOnly "org.mapstruct:mapstruct-processor:${mapstructVersion}"
76 compileOnly "com.google.code.findbugs:jsr305:${findbugsJsr305Version}"
77 implementation "jakarta.security.jacc:jakarta.security.jacc-api:${jakartaJaccVersion}"
78 implementation "net.java.dev.jna:jna:${jnaVersion}"
Matthias Andreas Benkardf611d9e2020-01-13 05:04:52 +010079 }
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +010080}
81
82spotless {
Matthias Andreas Benkard4be112f2020-01-12 20:29:38 +010083 java {
84 googleJavaFormat()
85 removeUnusedImports()
86 }
Matthias Andreas Benkard4c5847b2020-01-12 15:42:02 +010087}
88
Matthias Andreas Benkardf7bf7c42020-01-28 22:31:12 +010089group "eu.mulk"
90version "${projectVersion}"
Matthias Andreas Benkard2a107552020-01-23 10:47:52 +010091
92task yarnInstall(type:Exec) {
93 workingDir "src/main/resources/META-INF/resources"
94 commandLine "yarn", "install"
95}
96
97task snowpack(type:Exec) {
98 dependsOn yarnInstall
99
100 workingDir "src/main/resources/META-INF/resources"
101 commandLine "yarn", "run", "snowpack"
102}
103
104task compileWeb {
105 dependsOn snowpack
106
107 doLast {}
108}
109
Matthias Andreas Benkardb712a012020-01-26 08:10:49 +0100110processResources {
111 exclude("META-INF/resources/node_modules/**/*")
Matthias Andreas Benkard97130f92020-01-27 21:03:39 +0100112 exclude("META-INF/resources/package.json")
113 exclude("META-INF/resources/yarn.lock")
Matthias Andreas Benkardb712a012020-01-26 08:10:49 +0100114}
115
Matthias Andreas Benkardb428e522020-01-26 08:13:04 +0100116quarkusBuild.dependsOn compileWeb
Matthias Andreas Benkardf7bf7c42020-01-28 22:31:12 +0100117
118task buildDocker(type: com.bmuschko.gradle.docker.tasks.image.DockerBuildImage) {
119 inputDir = file(".")
120 dockerFile = file("src/main/docker/Dockerfile.jvm")
121 images.add("docker.benkard.de/mulk/mulkcms2:${projectVersion}")
122}
123
124buildDocker.dependsOn quarkusBuild
125assemble.dependsOn buildDocker
126
127task pushDocker(type: com.bmuschko.gradle.docker.tasks.image.DockerPushImage) {
128 images.add("docker.benkard.de/mulk/mulkcms2:${projectVersion}")
129}
130
131pushDocker.dependsOn buildDocker