Skip to content

Commit

Permalink
Fix build.gradle errors, align with SR GraphQL build.gradle
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Edgar <michael@xlate.io>
  • Loading branch information
MikeEdgar committed Mar 22, 2023
1 parent 8818d1c commit e75ad93
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 32 deletions.
77 changes: 46 additions & 31 deletions tools/gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,58 +1,73 @@
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

plugins {
`java-gradle-plugin`
id 'java-gradle-plugin'
id("com.gradle.plugin-publish") version "1.1.0"
id("com.github.vlsi.jandex") version "1.87"
}

group = "io.smallrye"

if (JavaVersion.current().isJava9Compatible()) {
compileJava.options.compilerArgs.addAll(['--release', '8'])
}

compileJava {
options.encoding = 'UTF-8'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}

compileTestJava {
options.encoding = 'UTF-8'
}

repositories {
mavenLocal()
mavenCentral()
maven {
url = uri("file:./target/dependencies")
}
}

dependencies {
val configVersion: String by project
val versionJackson: String by project
val versionJunit5: String by project

implementation("io.smallrye:smallrye-open-api-core:$version")
implementation("io.smallrye:smallrye-open-api-jaxrs:$version")
implementation("io.smallrye:smallrye-open-api-spring:$version")
implementation("io.smallrye:smallrye-open-api-vertx:$version")
implementation("io.smallrye.config:smallrye-config:$configVersion")
implementation("io.smallrye:smallrye-open-api-core:${version}")
implementation("io.smallrye:smallrye-open-api-jaxrs:${version}")
implementation("io.smallrye:smallrye-open-api-spring:${version}")
implementation("io.smallrye:smallrye-open-api-vertx:${version}")
implementation("io.smallrye.config:smallrye-config:${versionConfig}")

testImplementation("org.junit.jupiter:junit-jupiter:${versionJunit5}")
testImplementation(gradleTestKit())
testImplementation("org.assertj:assertj-core:3.24.2")
testImplementation("com.fasterxml.jackson.core:jackson-databind:${versionJackson}")
}

gradlePlugin {
val smallryePlugin by plugins.creating {
id = "io.smallrye.openapi"
implementationClass = "io.smallrye.openapi.gradleplugin.SmallryeOpenApiPlugin"
description = "Official Smallrye Open API Gradle plugin"
test {
testLogging {
events "passed", "skipped", "failed"
}
useJUnitPlatform()
// multiple Gradle invocations executed from the same testing JVM cause problems, so fork
// for each test, and make sure we only run one Gradle execution in each test
forkEvery 1
}

pluginBundle {
website = "https://github.com/smallrye/smallrye-open-api/"
vcsUrl = "https://github.com/smallrye/smallrye-open-api/"
tags = listOf("openapi", "smallrye")
}

tasks.named<Test>("test") {
useJUnitPlatform()
gradlePlugin {
website = 'https://github.com/smallrye/smallrye-open-api/'
vcsUrl = 'https://github.com/smallrye/smallrye-open-api/'
plugins {
smallryeOpenAPIPlugin {
id = 'io.smallrye.openapi'
implementationClass = 'io.smallrye.openapi.gradleplugin.SmallryeOpenApiPlugin'
description = 'SmallRye: MicroProfile OpenAPI Gradle Plugin'
displayName = 'SmallRye: MicroProfile OpenAPI Gradle Plugin'
description = 'SmallRye: MicroProfile GraphQL Gradle Plugin'
tags.set([ 'smallrye', 'openapi', 'microprofile' ])
}
}
}

tasks.named("pluginUnderTestMetadata") {
dependsOn("processJandexIndex")
wrapper {
distributionType = Wrapper.DistributionType.ALL
}

group = "io.smallrye"
tasks.pluginUnderTestMetadata.dependsOn(processJandexIndex)
2 changes: 1 addition & 1 deletion tools/gradle-plugin/src/maven-build/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# DO ONLY MODIFY THE FILE IN src/maven-build !
#
version=${project.version}
configVersion=${version.io.smallrye.smallrye-config}
versionConfig=${version.io.smallrye.smallrye-config}
versionJackson=${jackson-bom.version}
versionJunit5=${version.junit5}

0 comments on commit e75ad93

Please sign in to comment.