/* * This file was generated by the Gradle 'init' task. * * This generated file contains a sample Java library project to get you started. * For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle * User Manual available at https://docs.gradle.org/7.5.1/userguide/building_java_projects.html */ plugins { // Apply the java-library plugin for API and implementation separation. id 'java-library' id "org.openapi.generator" version "6.6.0" id 'org.springframework.boot' version '2.7.2' id 'io.spring.dependency-management' version '1.0.12.RELEASE' id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' id "maven-publish" id 'signing' id 'jacoco' } bootJar { enabled = false } jar { enabled = true } java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 withJavadocJar() withSourcesJar() } repositories { // Use Maven Central for resolving dependencies. mavenCentral() } dependencies { // Use JUnit Jupiter for testing. testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2' // This dependency is exported to consumers, that is to say found on their compile classpath. api 'org.apache.commons:commons-math3:3.6.1' // This dependency is used internally, and not exposed to consumers on their own compile classpath. implementation 'com.google.guava:guava:31.0.1-jre' // for open api generator implementation "io.github.openfeign:feign-okhttp:11.10" implementation "io.github.openfeign:feign-core:11.10" implementation "io.github.openfeign:feign-jackson:11.10" implementation "com.github.scribejava:scribejava-core:8.3.1" implementation "io.github.openfeign.form:feign-form:3.8.0" implementation "io.github.openfeign:feign-slf4j:11.9.1" implementation "io.swagger:swagger-annotations:1.6.6" implementation 'io.swagger:swagger-models:1.6.6' implementation 'io.swagger:swagger-core:1.6.6' implementation "org.openapitools:jackson-databind-nullable:0.2.1" implementation "net.bytebuddy:byte-buddy:1.14.4" // jaskson implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8" implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4' implementation 'com.fasterxml.jackson.core:jackson-annotations:2.13.3' implementation 'com.fasterxml.jackson.core:jackson-core:2.13.3' implementation 'javax.annotation:javax.annotation-api:1.3.2' // spring? testImplementation 'org.springframework.boot:spring-boot-starter-web' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation "javax.validation:validation-api:2.0.1.Final" // immutable compileOnly 'org.immutables:value:2.9.2' annotationProcessor 'org.immutables:value:2.9.2' // cron utils implementation 'com.cronutils:cron-utils:9.2.0' } tasks.named('test') { // Use JUnit Platform for unit tests. useJUnitPlatform() } openApiValidate { inputSpec = "$rootDir/iwf-idl/iwf-sdk.yaml".toString() } openApiGenerate { generatorName = "java" inputSpec = "$rootDir/iwf-idl/iwf-sdk.yaml".toString() outputDir = "$buildDir/generated".toString() apiPackage = "io.iworkflow.gen.api" modelPackage = "io.iworkflow.gen.models" invokerPackage = "io.iworkflow.gen.api" configOptions = [ configPackage: "io.iworkflow.gen.configuration", basePackage : "io.iworkflow.gen", library : "feign", interfaceOnly: "true" ] } jacocoTestReport { reports { xml.enabled true html.enabled true } } check.dependsOn jacocoTestReport compileJava.dependsOn tasks.openApiGenerate sourceSets.main.java.srcDirs += "$buildDir/generated/src/main/java" publishing { publications { mavenJava(MavenPublication) { from(components.java) pom { name = "iwf-java-sdk" description = "iwf java sdk core" url = 'https://github.com/indeedeng/iwf-java-sdk' scm { connection = 'scm:git@github.com:indeedeng/iwf-java-sdk.git' developerConnection = 'scm:git@github.com:indeedeng/iwf-java-sdk.git' url = 'https://github.com/indeedeng/iwf-java-sdk.git' } licenses { license { name = 'The Apache License, Version 2.0' url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' } } developers { developer { id = 'longquanzheng' name = 'Quanzheng Long' email = 'qlong.seattle@gmail.com' } } } } } } signing { sign publishing.publications.mavenJava } group = "io.iworkflow" version = "2.8.1" nexusPublishing { repositories { sonatype { nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) // username = project.property('myNexusUsername') // password = project.property('myNexusPassword') } } }