Matthias Andreas Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 1 | plugins { |
Matthias Andreas Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 2 | id 'java' |
| 3 | id 'io.quarkus' |
Matthias Andreas Benkard | f7bf7c4 | 2020-01-28 22:31:12 +0100 | [diff] [blame] | 4 | id "com.bmuschko.docker-remote-api" version "${dockerPluginVersion}" |
Matthias Andreas Benkard | f611d9e | 2020-01-13 05:04:52 +0100 | [diff] [blame] | 5 | 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 Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 8 | } |
| 9 | |
Matthias Andreas Benkard | 513deee | 2020-01-12 20:58:56 +0100 | [diff] [blame] | 10 | sourceCompatibility = 11 |
| 11 | targetCompatibility = 11 |
| 12 | |
Matthias Andreas Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 13 | repositories { |
| 14 | mavenLocal() |
| 15 | mavenCentral() |
| 16 | } |
| 17 | |
Matthias Andreas Benkard | f611d9e | 2020-01-13 05:04:52 +0100 | [diff] [blame] | 18 | tasks { |
| 19 | dependencyUpdates { |
| 20 | checkConstraints = true |
| 21 | gradleReleaseChannel = "current" |
| 22 | revision = "release" |
| 23 | } |
| 24 | } |
| 25 | |
Matthias Andreas Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 26 | dependencies { |
| 27 | implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") |
| 28 | |
| 29 | implementation 'io.quarkus:quarkus-agroal' |
Matthias Andreas Benkard | c27d1cb | 2020-01-26 11:11:24 +0100 | [diff] [blame] | 30 | implementation 'io.quarkus:quarkus-elytron-security-properties-file' |
Matthias Andreas Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 31 | 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 Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 35 | implementation 'io.quarkus:quarkus-kubernetes' |
| 36 | implementation 'io.quarkus:quarkus-mailer' |
Matthias Andreas Benkard | 24a2514 | 2020-01-24 13:25:54 +0100 | [diff] [blame] | 37 | implementation 'io.quarkus:quarkus-oidc' |
Matthias Andreas Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 38 | implementation 'io.quarkus:quarkus-resteasy' |
| 39 | implementation 'io.quarkus:quarkus-resteasy-jsonb' |
| 40 | implementation 'io.quarkus:quarkus-resteasy-qute' |
Matthias Andreas Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 41 | implementation 'io.quarkus:quarkus-scheduler' |
Matthias Andreas Benkard | 2a1383f | 2020-02-01 23:53:17 +0100 | [diff] [blame^] | 42 | implementation 'io.quarkus:quarkus-smallrye-jwt' |
Matthias Andreas Benkard | e5f81e5 | 2020-01-18 12:48:40 +0100 | [diff] [blame] | 43 | |
| 44 | //implementation 'io.quarkus:quarkus-elytron-security' |
| 45 | //implementation 'io.quarkus:quarkus-elytron-security-jdbc' |
| 46 | //implementation 'io.quarkus:quarkus-elytron-security-oauth2' |
| 47 | //implementation 'io.quarkus:quarkus-keycloak-authorization' |
Matthias Andreas Benkard | e5f81e5 | 2020-01-18 12:48:40 +0100 | [diff] [blame] | 48 | //implementation 'io.quarkus:quarkus-quartz' |
Matthias Andreas Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 49 | //implementation 'io.quarkus:quarkus-smallrye-fault-tolerance' |
| 50 | //implementation 'io.quarkus:quarkus-smallrye-health' |
| 51 | //implementation 'io.quarkus:quarkus-smallrye-metrics' |
| 52 | //implementation 'io.quarkus:quarkus-smallrye-openapi' |
| 53 | |
| 54 | //implementation 'jakarta.transaction:jakarta.transaction-api' |
| 55 | //implementation 'org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.3_spec' |
| 56 | //implementation 'jakarta.persistence:jakarta.persistence-api' |
| 57 | |
Matthias Andreas Benkard | 2a1383f | 2020-02-01 23:53:17 +0100 | [diff] [blame^] | 58 | implementation "org.bitbucket.b_c:jose4j" |
| 59 | |
Matthias Andreas Benkard | 5d71a9e | 2020-01-18 12:31:26 +0100 | [diff] [blame] | 60 | implementation 'org.mapstruct:mapstruct' |
| 61 | compileOnly 'org.mapstruct:mapstruct-processor' |
| 62 | |
| 63 | compileOnly 'com.google.code.findbugs:jsr305' |
| 64 | |
Matthias Andreas Benkard | f611d9e | 2020-01-13 05:04:52 +0100 | [diff] [blame] | 65 | implementation 'com.vladmihalcea:hibernate-types-52' |
Matthias Andreas Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 66 | |
Matthias Andreas Benkard | 5d71a9e | 2020-01-18 12:31:26 +0100 | [diff] [blame] | 67 | implementation "jakarta.security.jacc:jakarta.security.jacc-api" |
| 68 | implementation "net.java.dev.jna:jna" |
| 69 | |
Matthias Andreas Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 70 | testImplementation 'io.quarkus:quarkus-junit5' |
| 71 | testImplementation 'io.rest-assured:rest-assured' |
Matthias Andreas Benkard | f611d9e | 2020-01-13 05:04:52 +0100 | [diff] [blame] | 72 | |
Matthias Andreas Benkard | 4e29a24 | 2020-01-25 05:38:27 +0100 | [diff] [blame] | 73 | implementation 'org.jsoup:jsoup:1.12.1' |
| 74 | |
Matthias Andreas Benkard | f611d9e | 2020-01-13 05:04:52 +0100 | [diff] [blame] | 75 | constraints { |
Matthias Andreas Benkard | f611d9e | 2020-01-13 05:04:52 +0100 | [diff] [blame] | 76 | implementation "com.vladmihalcea:hibernate-types-52:${hibernateTypesVersion}" |
Matthias Andreas Benkard | 5d71a9e | 2020-01-18 12:31:26 +0100 | [diff] [blame] | 77 | implementation "org.mapstruct:mapstruct:${mapstructVersion}" |
| 78 | compileOnly "org.mapstruct:mapstruct-processor:${mapstructVersion}" |
| 79 | compileOnly "com.google.code.findbugs:jsr305:${findbugsJsr305Version}" |
| 80 | implementation "jakarta.security.jacc:jakarta.security.jacc-api:${jakartaJaccVersion}" |
| 81 | implementation "net.java.dev.jna:jna:${jnaVersion}" |
Matthias Andreas Benkard | 2a1383f | 2020-02-01 23:53:17 +0100 | [diff] [blame^] | 82 | implementation "org.bitbucket.b_c:jose4j:${jose4jVersion}" |
Matthias Andreas Benkard | f611d9e | 2020-01-13 05:04:52 +0100 | [diff] [blame] | 83 | } |
Matthias Andreas Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 84 | } |
| 85 | |
| 86 | spotless { |
Matthias Andreas Benkard | 4be112f | 2020-01-12 20:29:38 +0100 | [diff] [blame] | 87 | java { |
| 88 | googleJavaFormat() |
| 89 | removeUnusedImports() |
| 90 | } |
Matthias Andreas Benkard | 4c5847b | 2020-01-12 15:42:02 +0100 | [diff] [blame] | 91 | } |
| 92 | |
Matthias Andreas Benkard | f7bf7c4 | 2020-01-28 22:31:12 +0100 | [diff] [blame] | 93 | group "eu.mulk" |
| 94 | version "${projectVersion}" |
Matthias Andreas Benkard | 2a10755 | 2020-01-23 10:47:52 +0100 | [diff] [blame] | 95 | |
| 96 | task yarnInstall(type:Exec) { |
| 97 | workingDir "src/main/resources/META-INF/resources" |
| 98 | commandLine "yarn", "install" |
| 99 | } |
| 100 | |
| 101 | task snowpack(type:Exec) { |
| 102 | dependsOn yarnInstall |
| 103 | |
| 104 | workingDir "src/main/resources/META-INF/resources" |
| 105 | commandLine "yarn", "run", "snowpack" |
| 106 | } |
| 107 | |
| 108 | task compileWeb { |
| 109 | dependsOn snowpack |
| 110 | |
| 111 | doLast {} |
| 112 | } |
| 113 | |
Matthias Andreas Benkard | b712a01 | 2020-01-26 08:10:49 +0100 | [diff] [blame] | 114 | processResources { |
| 115 | exclude("META-INF/resources/node_modules/**/*") |
Matthias Andreas Benkard | 97130f9 | 2020-01-27 21:03:39 +0100 | [diff] [blame] | 116 | exclude("META-INF/resources/package.json") |
| 117 | exclude("META-INF/resources/yarn.lock") |
Matthias Andreas Benkard | b712a01 | 2020-01-26 08:10:49 +0100 | [diff] [blame] | 118 | } |
| 119 | |
Matthias Andreas Benkard | b428e52 | 2020-01-26 08:13:04 +0100 | [diff] [blame] | 120 | quarkusBuild.dependsOn compileWeb |
Matthias Andreas Benkard | f7bf7c4 | 2020-01-28 22:31:12 +0100 | [diff] [blame] | 121 | |
| 122 | task buildDocker(type: com.bmuschko.gradle.docker.tasks.image.DockerBuildImage) { |
| 123 | inputDir = file(".") |
| 124 | dockerFile = file("src/main/docker/Dockerfile.jvm") |
| 125 | images.add("docker.benkard.de/mulk/mulkcms2:${projectVersion}") |
| 126 | } |
| 127 | |
| 128 | buildDocker.dependsOn quarkusBuild |
| 129 | assemble.dependsOn buildDocker |
| 130 | |
| 131 | task pushDocker(type: com.bmuschko.gradle.docker.tasks.image.DockerPushImage) { |
| 132 | images.add("docker.benkard.de/mulk/mulkcms2:${projectVersion}") |
| 133 | } |
| 134 | |
| 135 | pushDocker.dependsOn buildDocker |