import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
import com.bmuschko.gradle.docker.tasks.image.DockerPushImage

plugins {
    id 'java'
    id 'io.quarkus'
    id "com.bmuschko.docker-remote-api" version "${dockerPluginVersion}"
    id "com.diffplug.gradle.spotless" version "${spotlessPluginVersion}"
    id "com.github.ben-manes.versions" version "${versionsPluginVersion}"
    id "se.patrikerdes.use-latest-versions" version "${useLatestVersionsPluginVersion}"
}

sourceCompatibility = 11
targetCompatibility = 11

repositories {
     mavenLocal()
     mavenCentral()
}

tasks {
    dependencyUpdates {
        checkConstraints = true
        gradleReleaseChannel = "current"
        revision = "release"
    }
}

dependencies {
    implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")

    implementation 'io.quarkus:quarkus-agroal'
    implementation 'io.quarkus:quarkus-elytron-security-properties-file'
    implementation 'io.quarkus:quarkus-flyway'
    implementation 'io.quarkus:quarkus-hibernate-orm-panache'
    implementation 'io.quarkus:quarkus-hibernate-validator'
    implementation 'io.quarkus:quarkus-jdbc-postgresql'
    implementation 'io.quarkus:quarkus-kubernetes'
    implementation 'io.quarkus:quarkus-mailer'
    implementation 'io.quarkus:quarkus-oidc'
    implementation 'io.quarkus:quarkus-resteasy'
    implementation 'io.quarkus:quarkus-resteasy-jsonb'
    implementation 'io.quarkus:quarkus-resteasy-qute'
    implementation 'io.quarkus:quarkus-scheduler'
    implementation 'io.quarkus:quarkus-smallrye-jwt'

    //implementation 'io.quarkus:quarkus-elytron-security'
    //implementation 'io.quarkus:quarkus-elytron-security-jdbc'
    //implementation 'io.quarkus:quarkus-elytron-security-oauth2'
    //implementation 'io.quarkus:quarkus-keycloak-authorization'
    //implementation 'io.quarkus:quarkus-quartz'
    //implementation 'io.quarkus:quarkus-smallrye-fault-tolerance'
    //implementation 'io.quarkus:quarkus-smallrye-health'
    //implementation 'io.quarkus:quarkus-smallrye-metrics'
    //implementation 'io.quarkus:quarkus-smallrye-openapi'

    //implementation 'jakarta.transaction:jakarta.transaction-api'
    //implementation 'org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.3_spec'
    //implementation 'jakarta.persistence:jakarta.persistence-api'

    implementation "org.bitbucket.b_c:jose4j"

    implementation 'org.mapstruct:mapstruct'
    compileOnly 'org.mapstruct:mapstruct-processor'

    compileOnly 'com.google.code.findbugs:jsr305'

    implementation 'com.vladmihalcea:hibernate-types-52'

    implementation "jakarta.security.jacc:jakarta.security.jacc-api"
    implementation "net.java.dev.jna:jna"

    testImplementation 'io.quarkus:quarkus-junit5'
    testImplementation 'io.rest-assured:rest-assured'

    implementation "org.jsoup:jsoup"

    implementation "com.vladsch.flexmark:flexmark-all"

    constraints {
        implementation "com.vladmihalcea:hibernate-types-52:${hibernateTypesVersion}"
        implementation "org.mapstruct:mapstruct:${mapstructVersion}"
        compileOnly "org.mapstruct:mapstruct-processor:${mapstructVersion}"
        compileOnly "com.google.code.findbugs:jsr305:${findbugsJsr305Version}"
        implementation "jakarta.security.jacc:jakarta.security.jacc-api:${jakartaJaccVersion}"
        implementation "net.java.dev.jna:jna:${jnaVersion}"
        implementation "org.bitbucket.b_c:jose4j:${jose4jVersion}"
        implementation "com.vladsch.flexmark:flexmark-all:${flexmarkVersion}"
        implementation "org.jsoup:jsoup:${jsoupVersion}"
    }
}

spotless {
  java {
    googleJavaFormat()
    removeUnusedImports()
  }
}

group "eu.mulk"
version "${projectVersion}"

task yarnInstall(type:Exec) {
  def resourceDir = "src/main/resources/META-INF/resources"

  onlyIf { !project.hasProperty('skipWeb') }

  inputs.file "${resourceDir}/package.json"
  outputs.dir "${resourceDir}/node_modules"
  outputs.file "${resourceDir}/yarn.lock"

  workingDir resourceDir
  commandLine "yarn", "install"
}

task snowpack(type:Exec) {
  def resourceDir = "src/main/resources/META-INF/resources"

  onlyIf { !project.hasProperty('skipWeb') }

  dependsOn yarnInstall

  inputs.dir "${resourceDir}/node_modules"
  inputs.file "${resourceDir}/yarn.lock"
  inputs.file "${resourceDir}/package.json"
  outputs.dir "${resourceDir}/web_modules"

  workingDir resourceDir
  commandLine "yarn", "run", "snowpack"
}

task compileWeb {
  dependsOn snowpack

  doLast {}
}

processResources {
    exclude("META-INF/resources/node_modules/**/*")
    exclude("META-INF/resources/package.json")
    exclude("META-INF/resources/yarn.lock")
}

quarkusBuild.dependsOn compileWeb

task buildDocker(type: DockerBuildImage) {
    onlyIf { !project.hasProperty('skipDocker') }

    inputDir = file(".")
    dockerFile = file("src/main/docker/Dockerfile.jvm")
    images.add("docker.benkard.de/mulk/mulkcms2:${projectVersion}")
}

buildDocker.dependsOn quarkusBuild
assemble.dependsOn buildDocker

task pushDocker(type: DockerPushImage) {
    images.add("docker.benkard.de/mulk/mulkcms2:${projectVersion}")
}

pushDocker.dependsOn buildDocker
