Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove subprojects build config, add group and version #40

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 25 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ plugins {

apply from: 'publish.gradle'

group = 'dev.openfga'
version = '0.0.1'

java {
sourceCompatibility = 17
targetCompatibility = 17
Expand Down Expand Up @@ -50,50 +53,31 @@ test {
useJUnitPlatform()
}

subprojects {
apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'
apply plugin: 'jacoco'

group = "dev.openfga"
version = "0.0.1-SNAPSHOT"

java {
sourceCompatibility = 17
targetCompatibility = 17
}

repositories {
mavenCentral()
spotless {
format 'misc', {
// define the files (e.g. '*.gradle', '*.md') to apply `misc` to
target '.gitignore', '*.gradle'
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}

spotless {
format 'misc', {
// define the files (e.g. '*.gradle', '*.md') to apply `misc` to
target '.gitignore', '*.gradle'
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
java {
palantirJavaFormat()
removeUnusedImports()
importOrder()
}
java {
palantirJavaFormat()
removeUnusedImports()
importOrder()
}
}

test {
finalizedBy jacocoTestReport // report is always generated after tests run
}

jacocoTestReport {
// tests are required to run before generating a JaCoCo coverage report.
dependsOn test
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}

tasks.register('fmt') {
dependsOn 'spotlessApply'
}
jacocoTestReport {
// tests are required to run before generating a JaCoCo coverage report.
dependsOn test
}

tasks.register('fmt') {
dependsOn 'spotlessApply'
}
Loading