Skip to content

Commit 52a4052

Browse files
authored
Merge pull request #58 from myndocs/gradle-doc
Add gradle to documentation
2 parents e4133ad + 4a0644b commit 52a4052

File tree

5 files changed

+68
-28
lines changed

5 files changed

+68
-28
lines changed

README.md

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,37 @@ It encourages to adapt to existing implementations instead the other way around.
88
# Frameworks
99
## Setup
1010
### Maven
11-
First define the version to be used and set it as a property
11+
1212
```xml
1313
<properties>
1414
<myndocs.oauth.version>0.5.0</myndocs.oauth.version>
1515
</properties>
16-
```
1716

18-
Include the following repository in order to download the artifacts
19-
```xml
17+
<dependencies>
18+
<dependency>
19+
<groupId>nl.myndocs</groupId>
20+
<artifactId>oauth2-server-core</artifactId>
21+
<version>${myndocs.oauth.version}</version>
22+
</dependency>
23+
24+
<!-- In memory dependencies -->
25+
<dependency>
26+
<groupId>nl.myndocs</groupId>
27+
<artifactId>oauth2-server-client-inmemory</artifactId>
28+
<version>${myndocs.oauth.version}</version>
29+
</dependency>
30+
<dependency>
31+
<groupId>nl.myndocs</groupId>
32+
<artifactId>oauth2-server-identity-inmemory</artifactId>
33+
<version>${myndocs.oauth.version}</version>
34+
</dependency>
35+
<dependency>
36+
<groupId>nl.myndocs</groupId>
37+
<artifactId>oauth2-server-token-store-inmemory</artifactId>
38+
<version>${myndocs.oauth.version}</version>
39+
</dependency>
40+
</dependencies>
41+
2042
<repositories>
2143
<repository>
2244
<id>myndocs-oauth2</id>
@@ -25,32 +47,22 @@ Include the following repository in order to download the artifacts
2547
</repositories>
2648
```
2749

28-
For the frameworks examples we need at least the following dependencies:
29-
```xml
30-
<dependency>
31-
<groupId>nl.myndocs</groupId>
32-
<artifactId>oauth2-server-core</artifactId>
33-
<version>${myndocs.oauth.version}</version>
34-
</dependency>
35-
36-
<!-- In memory dependencies -->
37-
<dependency>
38-
<groupId>nl.myndocs</groupId>
39-
<artifactId>oauth2-server-client-inmemory</artifactId>
40-
<version>${myndocs.oauth.version}</version>
41-
</dependency>
42-
<dependency>
43-
<groupId>nl.myndocs</groupId>
44-
<artifactId>oauth2-server-identity-inmemory</artifactId>
45-
<version>${myndocs.oauth.version}</version>
46-
</dependency>
47-
<dependency>
48-
<groupId>nl.myndocs</groupId>
49-
<artifactId>oauth2-server-token-store-inmemory</artifactId>
50-
<version>${myndocs.oauth.version}</version>
51-
</dependency>
50+
### Gradle
51+
```groovy
52+
repositories {
53+
maven { url 'https://dl.bintray.com/adhesivee/oauth2-server' }
54+
}
55+
56+
dependencies {
57+
compile "nl.myndocs:oauth2-server-core:$myndocs_oauth_version"
58+
// In memory dependencies
59+
compile "nl.myndocs:oauth2-server-client-inmemory:$myndocs_oauth_version"
60+
compile "nl.myndocs:oauth2-server-identity-inmemory:$myndocs_oauth_version"
61+
compile "nl.myndocs:oauth2-server-token-store-inmemory:$myndocs_oauth_version"
62+
}
5263
```
5364

65+
5466
### Framework implementation
5567
The following frameworks are supported:
5668
- [Ktor](docs/ktor.md)

docs/http4k.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# http4k
22

33
## Dependencies
4+
5+
### Maven
46
```xml
57
<dependency>
68
<groupId>nl.myndocs</groupId>
@@ -9,6 +11,12 @@
911
</dependency>
1012
```
1113

14+
### Gradle
15+
```groovy
16+
compile "nl.myndocs:oauth2-server-http4k:$myndocs_oauth_version"
17+
```
18+
19+
1220
## Implementation
1321
```kotlin
1422
val app: HttpHandler = routes(

docs/javalin.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Javalin
22

33
## Dependencies
4+
5+
### Maven
46
```xml
57
<dependency>
68
<groupId>nl.myndocs</groupId>
@@ -9,6 +11,11 @@
911
</dependency>
1012
```
1113

14+
### Gradle
15+
```groovy
16+
compile "nl.myndocs:oauth2-server-javalin:$myndocs_oauth_version"
17+
```
18+
1219
## Implementation
1320
```kotlin
1421
Javalin.create().apply {

docs/ktor.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Dependencies
44

5+
### Maven
56
```xml
67
<dependency>
78
<groupId>nl.myndocs</groupId>
@@ -10,6 +11,11 @@
1011
</dependency>
1112
```
1213

14+
### Gradle
15+
```groovy
16+
compile "nl.myndocs:oauth2-server-ktor:$myndocs_oauth_version"
17+
```
18+
1319
## Implementation
1420
```kotlin
1521
embeddedServer(Netty, 8080) {

docs/sparkjava.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Spark java
22

33
## Dependencies
4+
5+
### Maven
46
```xml
57
<dependency>
68
<groupId>nl.myndocs</groupId>
@@ -9,6 +11,11 @@
911
</dependency>
1012
```
1113

14+
### Gradle
15+
```groovy
16+
compile "nl.myndocs:oauth2-server-sparkjava:$myndocs_oauth_version"
17+
```
18+
1219
## Implementation
1320
```kotlin
1421
Oauth2Server.configureOauth2Server {

0 commit comments

Comments
 (0)