Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

3.2 KB
Raw Blame
plugins {
  id 'java-library'
  id 'groovy'
  id 'maven-publish'
  id 'signing'
}

dependencies {
  api libs.jacksonDatabind
  api libs.jacksonDatatypeJdk8
  api libs.jacksonDatatypeJsr310
  api libs.jacksonModuleParameterNames

  api libs.hibernateCore
  api libs.hibernateValidator
  api libs.jakartaElApi
  api libs.jakartaAnnotationApi
  api libs.jakartaWsRsApi
  api libs.resteasyCacheCore

  api libs.keycloakCore

  api libs.geotoolsMain
  api libs.jaywayJsonPath

  api libs.easyRulesCore
  api libs.ical4j
  api libs.reflections
  api libs.guava

  api libs.checkerQual

  api libs.swaggerAnnotations

  api libs.victoolsJsonschemaGenerator
  api libs.victoolsJsonschemaModuleJackson
  api libs.victoolsJsonschemaModuleJakartaValidation

  api libs.classgraph
  api libs.micrometerCore
  api libs.friendlyId
  api libs.javaUuidGenerator

  api libs.exp4j

  dependencies {
    testImplementation libs.groovy
    testImplementation libs.jsonassert
    testImplementation platform(libs.spockBom)
    testImplementation libs.spockCore
    testRuntimeOnly libs.jakartaEl
    testRuntimeOnly "org.junit.platform:junit-platform-launcher"
  }
}

tasks.withType(Test) {
  environment("OR_LOGGING_CONFIG_FILE", "logging-dev.properties")
}

test {}

base {
  archivesName = "openremote-${project.name}"
}

jar {
  from sourceSets.main.allJava
}

javadoc {
  failOnError = false
}

java {
  withJavadocJar()
  withSourcesJar()
}

publishing {
  publications {
    maven(MavenPublication) {
      group = "io.openremote"
      artifactId = "openremote-${project.name}"
      from components.java
      pom {
        name = 'OpenRemote Model'
        description = 'Provides core model classes used within OpenRemote; add maven {url "https://repo.osgeo.org/repository/release/"} and maven {url "https://pkgs.dev.azure.com/OpenRemote/OpenRemote/_packaging/OpenRemote/maven/v1"} to resolve all dependencies'
        url = 'https://github.com/openremote/core'
        licenses {
          license {
            name = 'GNU Affero General Public License v3.0'
            url = 'https://www.gnu.org/licenses/agpl-3.0.en.html'
          }
        }
        developers {
          developer {
            id = 'developers'
            name = 'Developers'
            email = '[email protected]'
            organization = 'OpenRemote'
            organizationUrl = 'https://openremote.io'
          }
        }
        scm {
          connection = 'scm:git:git://github.com/openremote/core.git'
          developerConnection = 'scm:git:ssh://github.com:openremote/core.git'
          url = 'https://github.com/openremote/core/tree/main'
        }
      }
    }
  }

  repositories {
    maven {
      if (!version.endsWith('-LOCAL')) {
        credentials {
          username = findProperty("publishUsername")
          password = findProperty("publishPassword")
        }
      }
      url = version.endsWith('-LOCAL') ? layout.buildDirectory.dir('repo') : version.endsWith('-SNAPSHOT') ? findProperty("snapshotsRepoUrl") : findProperty("releasesRepoUrl")
    }
  }
}

signing {
  def signingKey = findProperty("signingKey")
  def signingPassword = findProperty("signingPassword")
  if (signingKey && signingPassword) {
    useInMemoryPgpKeys(signingKey, signingPassword)
    sign publishing.publications.maven
  }
}