Skip to content

Commit

Permalink
fix: remove subprojects build config, add group and version (#40)
Browse files Browse the repository at this point in the history
<!-- Thanks for opening a PR! Here are some quick tips:
If this is your first time contributing, [read our Contributing
Guidelines](https://github.com/openfga/.github/blob/main/CONTRIBUTING.md)
to learn how to create an acceptable PR for this repo.
By submitting a PR to this repository, you agree to the terms within the
[OpenFGA Code of
Conduct](https://github.com/openfga/.github/blob/main/CODE_OF_CONDUCT.md)

If your PR is under active development, please submit it as a "draft".
Once it's ready, open it up for review.
-->

<!-- Provide a brief summary of the changes -->

Remove subprojects configuration.

## Description
<!-- Provide a detailed description of the changes -->

Missed from #39. Also added groupId and version in build file (may be
needed for GH package publish).

## References
<!-- Provide a list of any applicable references here (GitHub Issue,
[OpenFGA RFC](https://github.com/openfga/rfcs), other PRs, etc..) -->

## Review Checklist
- [x] I have clicked on ["allow edits by
maintainers"](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork).
- [ ] I have added documentation for new/changed functionality in this
PR or in a PR to [openfga.dev](https://github.com/openfga/openfga.dev)
[Provide a link to any relevant PRs in the references section above]
- [x] The correct base branch is being used, if not `main`
- [ ] I have added tests to validate that the change in functionality is
working as expected
  • Loading branch information
jimmyjames authored Apr 9, 2024
2 parents b50c934 + c1fc00d commit f256b3a
Showing 1 changed file with 25 additions and 41 deletions.
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'
}

0 comments on commit f256b3a

Please sign in to comment.