-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b79ab91
commit 87ceb30
Showing
14 changed files
with
94 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,42 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'org.springframework.boot' version '3.2.2' apply false | ||
id 'io.spring.dependency-management' version '1.1.4' | ||
|
||
id 'java' | ||
id 'com.diffplug.spotless' version '6.25.0' | ||
|
||
id 'maven-publish' | ||
} | ||
|
||
group = "dev.openfga" | ||
version = "0.0.1-SNAPSHOT" | ||
|
||
java { | ||
sourceCompatibility = 17 | ||
targetCompatibility = 17 | ||
} | ||
subprojects { | ||
apply plugin: 'java' | ||
apply plugin: 'com.diffplug.spotless' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
group = "dev.openfga" | ||
version = "0.0.1-SNAPSHOT" | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
dependencyManagement { | ||
imports { | ||
mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES | ||
java { | ||
sourceCompatibility = 17 | ||
targetCompatibility = 17 | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation 'org.springframework.boot:spring-boot' | ||
implementation 'org.springframework.boot:spring-boot-autoconfigure' | ||
implementation 'org.springframework.boot:spring-boot-starter-security' | ||
|
||
api 'dev.openfga:openfga-sdk:0.4.0' | ||
|
||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
testImplementation 'org.springframework.security:spring-security-test' | ||
testImplementation 'org.hamcrest:hamcrest:2.2' | ||
testImplementation 'org.mockito:mockito-core:5.11.0' | ||
|
||
|
||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
groupId = "${groupId}" | ||
artifactId = 'openfga-spring-boot-starter' | ||
version = "${version}" | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
from components.java | ||
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() | ||
} | ||
} | ||
} | ||
|
||
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() | ||
tasks.register('fmt') { | ||
dependsOn 'spotlessApply' | ||
} | ||
java { | ||
palantirJavaFormat() | ||
removeUnusedImports() | ||
importOrder() | ||
} | ||
} | ||
|
||
tasks.register('fmt') { | ||
dependsOn 'spotlessApply' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
plugins { | ||
id 'java' | ||
id 'org.springframework.boot' version '3.2.2' | ||
id 'io.spring.dependency-management' version '1.1.4' | ||
id 'maven-publish' | ||
} | ||
|
||
dependencies { | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
implementation project(':openfga-spring-boot-starter') | ||
} |
12 changes: 12 additions & 0 deletions
12
examples/servlet/src/main/java/dev/openfga/example/ServletFgaApp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package dev.openfga.example; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class ServletFgaApp { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(ServletFgaApp.class, args); | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'org.springframework.boot' version '3.2.2' apply false | ||
id 'io.spring.dependency-management' version '1.1.4' | ||
id 'maven-publish' | ||
} | ||
|
||
dependencyManagement { | ||
imports { | ||
mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation 'org.springframework.boot:spring-boot' | ||
implementation 'org.springframework.boot:spring-boot-autoconfigure' | ||
implementation 'org.springframework.boot:spring-boot-starter-security' | ||
|
||
api 'dev.openfga:openfga-sdk:0.4.0' | ||
|
||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
testImplementation 'org.springframework.security:spring-security-test' | ||
testImplementation 'org.hamcrest:hamcrest:2.2' | ||
testImplementation 'org.mockito:mockito-core:5.11.0' | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
groupId = "${groupId}" | ||
artifactId = 'openfga-spring-boot-starter' | ||
version = "${version}" | ||
|
||
from components.java | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
rootProject.name = 'fga-spring-boot-starter' | ||
|
||
include 'openfga-spring-boot-starter' | ||
include 'examples:servlet' |