Skip to content

Commit

Permalink
updated gradle build
Browse files Browse the repository at this point in the history
  • Loading branch information
Guy Davenport committed Oct 18, 2024
1 parent 6d998e1 commit 559c089
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
3 changes: 2 additions & 1 deletion generator/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.gradle
build
build
!gradle/wrapper/gradle-wrapper.jar
32 changes: 29 additions & 3 deletions generator/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin : "java"
ext {
javaMainClass = 'org.brapi.schematools.cli.BrAPICommand'
brapiSchemaToolsVersion = '0.5.0-SNAPSHOT'
brapiSchemaToolsVersion = '0.7.0-SNAPSHOT'
}

repositories {
Expand All @@ -13,11 +13,37 @@ dependencies {
implementation "org.brapi:brapi-schema-tools-cli:$brapiSchemaToolsVersion"
}

tasks.register('validate', JavaExec) {
tasks.register("validate", JavaExec) {
group = 'BrAPI'
description = 'Validate the Json Schema'
classpath = sourceSets.main.runtimeClasspath
mainClass = javaMainClass
workingDir = '../'
args = ['validate', 'Specification/BrAPI-Schema']
args = ['validate', 'Specification/BrAPI-Schema', '-x']
}

tasks.register("generateGraphQL", JavaExec) {
group = 'BrAPI'
description = 'Generate GraphQL schema from the Json Schema'
classpath = sourceSets.main.runtimeClasspath
mainClass = javaMainClass
workingDir = '../'
args = ['generate',
'Specification/BrAPI-Schema',
'-l', 'GRAPHQL',
'-f', 'Specification/Generated/schema.graphqls',
'-x']
}

tasks.register("generateOpenAPI", JavaExec) {
group = 'BrAPI'
description = 'Generate GraphQL schema from the Json Schema'
classpath = sourceSets.main.runtimeClasspath
mainClass = javaMainClass
workingDir = '../'
args = ['generate', 'Specification/BrAPI-Schema',
'-l', 'OPEN_API',
'-f', 'Specification/Generated/brapi_openapi.json',
'-c', 'Specification\\OpenAPI-Components',
'-x']
}

0 comments on commit 559c089

Please sign in to comment.