|
1 | 1 | plugins {
|
2 |
| - `java-gradle-plugin` |
3 |
| - id("com.gradle.plugin-publish") version "0.11.0" |
4 |
| - id("org.sonarqube") version "2.8" |
5 |
| - kotlin("jvm") version "1.3.70" |
6 |
| - `maven-publish` |
| 2 | + `java-gradle-plugin` |
| 3 | + id("com.gradle.plugin-publish") version "0.11.0" |
| 4 | + id("org.sonarqube") version "2.8" |
| 5 | + kotlin("jvm") version "1.3.70" |
| 6 | + `maven-publish` |
7 | 7 | }
|
8 | 8 |
|
9 | 9 | group = "org.springdoc"
|
10 | 10 | version = "1.3.1-SNAPSHOT"
|
11 | 11 |
|
12 | 12 | sonarqube {
|
13 |
| - properties { |
14 |
| - property("sonar.projectKey", "springdoc_springdoc-openapi-gradle-plugin") |
15 |
| - } |
| 13 | + properties { |
| 14 | + property("sonar.projectKey", "springdoc_springdoc-openapi-gradle-plugin") |
| 15 | + } |
16 | 16 | }
|
17 | 17 | repositories {
|
18 |
| - mavenCentral() |
19 |
| - maven { |
20 |
| - name = "Spring Repositories" |
21 |
| - url = uri("https://repo.spring.io/libs-release/") |
22 |
| - } |
23 |
| - gradlePluginPortal() |
| 18 | + mavenCentral() |
| 19 | + maven { |
| 20 | + name = "Spring Repositories" |
| 21 | + url = uri("https://repo.spring.io/libs-release/") |
| 22 | + } |
| 23 | + gradlePluginPortal() |
24 | 24 | }
|
25 | 25 |
|
26 | 26 | publishing {
|
27 |
| - repositories { |
28 |
| - if (project.hasProperty("localFileRepo")) { |
29 |
| - maven { |
30 |
| - name = "File-Based-Local-Repository" |
31 |
| - url = uri("file://${property("localFileRepo")}") |
32 |
| - } |
33 |
| - } |
34 |
| - } |
| 27 | + repositories { |
| 28 | + maven { |
| 29 | + // change URLs to point to your repos, e.g. http://my.org/repo |
| 30 | + val releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") |
| 31 | + val snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots") |
| 32 | + url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl |
| 33 | + credentials { |
| 34 | + username = System.getenv("OSSRH_USER") |
| 35 | + password = System.getenv("OSSRH_PASS") |
| 36 | + } |
| 37 | + } |
| 38 | + } |
35 | 39 | }
|
36 | 40 |
|
37 | 41 | dependencies {
|
38 |
| - implementation(kotlin("stdlib-jdk8")) |
39 |
| - implementation(kotlin("reflect")) |
40 |
| - implementation(group = "khttp", name = "khttp", version = "1.0.0") |
41 |
| - implementation(group = "com.google.code.gson", name = "gson", version = "2.8.6") |
42 |
| - implementation(group = "org.awaitility", name = "awaitility-kotlin", version = "4.0.2") |
43 |
| - implementation(files("$projectDir/libs/gradle-processes-0.5.0.jar")) |
| 42 | + implementation(kotlin("stdlib-jdk8")) |
| 43 | + implementation(kotlin("reflect")) |
| 44 | + implementation(group = "khttp", name = "khttp", version = "1.0.0") |
| 45 | + implementation(group = "com.google.code.gson", name = "gson", version = "2.8.6") |
| 46 | + implementation(group = "org.awaitility", name = "awaitility-kotlin", version = "4.0.2") |
| 47 | + implementation(files("$projectDir/libs/gradle-processes-0.5.0.jar")) |
44 | 48 |
|
45 |
| - testImplementation(gradleTestKit()) |
46 |
| - testImplementation("junit:junit:4.13") |
47 |
| - testImplementation("com.beust:klaxon:5.2") |
| 49 | + testImplementation(gradleTestKit()) |
| 50 | + testImplementation("junit:junit:4.13") |
| 51 | + testImplementation("com.beust:klaxon:5.2") |
48 | 52 | }
|
49 | 53 |
|
50 | 54 | gradlePlugin {
|
51 |
| - plugins { |
52 |
| - create("springdoc-gradle-plugin") { |
53 |
| - id = "org.springdoc.openapi-gradle-plugin" |
54 |
| - displayName = "A Gradle plugin for the springdoc-openapi library" |
55 |
| - description = " This plugin uses springdoc-openapi to generate an OpenAPI description at build time" |
56 |
| - implementationClass = "org.springdoc.openapi.gradle.plugin.OpenApiGradlePlugin" |
57 |
| - } |
58 |
| - } |
| 55 | + plugins { |
| 56 | + create("springdoc-gradle-plugin") { |
| 57 | + id = "org.springdoc.openapi-gradle-plugin" |
| 58 | + displayName = "A Gradle plugin for the springdoc-openapi library" |
| 59 | + description = " This plugin uses springdoc-openapi to generate an OpenAPI description at build time" |
| 60 | + implementationClass = "org.springdoc.openapi.gradle.plugin.OpenApiGradlePlugin" |
| 61 | + } |
| 62 | + } |
59 | 63 | }
|
60 | 64 |
|
61 | 65 | pluginBundle {
|
62 |
| - website = "https://github.com/springdoc/springdoc-openapi-gradle-plugin" |
63 |
| - vcsUrl = "https://github.com/springdoc/springdoc-openapi-gradle-plugin.git" |
64 |
| - tags = listOf("springdoc", "openapi", "swagger") |
| 66 | + website = "https://github.com/springdoc/springdoc-openapi-gradle-plugin" |
| 67 | + vcsUrl = "https://github.com/springdoc/springdoc-openapi-gradle-plugin.git" |
| 68 | + tags = listOf("springdoc", "openapi", "swagger") |
65 | 69 | }
|
66 | 70 |
|
67 | 71 | tasks {
|
68 |
| - compileKotlin { |
69 |
| - kotlinOptions.jvmTarget = "1.8" |
70 |
| - } |
71 |
| - compileTestKotlin { |
72 |
| - kotlinOptions.jvmTarget = "1.8" |
73 |
| - } |
| 72 | + compileKotlin { |
| 73 | + kotlinOptions.jvmTarget = "1.8" |
| 74 | + } |
| 75 | + compileTestKotlin { |
| 76 | + kotlinOptions.jvmTarget = "1.8" |
| 77 | + } |
74 | 78 | }
|
0 commit comments