-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
128 lines (113 loc) · 3.32 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0"
}
}
plugins {
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
}
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'signing'
group 'cc.vileda'
version '1.5.0'
repositories {
mavenCentral()
}
def pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
developers {
developer {
id "derveloper"
name "Tristan Leo"
email "[email protected]"
}
}
scm {
url "https://github.com/derveloper/kotlin-openapi3-dsl"
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
// add javadoc/source jar tasks as artifacts
artifacts {
archives sourcesJar, javadocJar
}
// Create the publication with the pom configuration:
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId 'cc.vileda'
artifactId 'kotlin-openapi3-dsl'
version "$version"
pom.withXml {
def root = asNode()
root.appendNode('description', 'Build your OpenApi3 spec in kotlin!')
root.appendNode('name', 'kotlin-openapi3-dsl')
root.appendNode('url', 'https://github.com/derveloper/kotlin-openapi3-dsl')
root.children().last() + pomConfig
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl = uri("https://oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications
}
test {
useJUnitPlatform()
}
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib:2.1.0'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "2.18.2"
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.18.2"
implementation 'com.fasterxml.jackson.module:jackson-module-jsonSchema:2.18.2'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-json-org:2.18.2'
api 'io.swagger.core.v3:swagger-core:2.2.27'
api 'io.swagger.parser.v3:swagger-parser:2.1.24'
implementation 'org.jetbrains.kotlin:kotlin-reflect:2.1.0'
testImplementation 'io.kotlintest:kotlintest-runner-junit5:3.4.2'
testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: '2.0.16'
}
compileKotlin {
kotlinOptions.jvmTarget = "17"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "17"
}
compileJava {
sourceCompatibility = 17
targetCompatibility = 17
}
compileTestJava {
sourceCompatibility = 17
targetCompatibility = 17
}