-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
189 lines (164 loc) · 6.18 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
apply plugin: 'idea'
apply plugin: 'maven-publish'
buildscript {
ext.kotlin_version = '1.8.22'
ext.kotlinxcoroutine_version = '1.7.3'
ext.kotlinlogging_version = '1.8.3'
ext.grpc_version = '1.34.1'
ext.jackson_version = '2.9.8'
ext.slf4j_version = '1.7.36'
ext.log4jslf4j_version = '2.20.0'
ext.junit5_version = '5.6.2'
ext.mockk_version = '1.10.0'
ext.assertj_version = '3.17.2'
ext.awaitility_version = '4.0.3'
ext.ktor_version = '1.6.8'
ext.guava_version = '29.0-jre'
ext.repos = {
mavenLocal()
mavenCentral()
jcenter()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
repositories repos
dependencies {
classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: "$kotlin_version"
classpath group: 'com.jfrog.bintray.gradle', name: 'gradle-bintray-plugin', version: '1.+'
}
}
ext.pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
scm {
url "https://github.com/blachris/ktor-grpcweb.git"
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'signing'
group 'com.github.blachris.ktor-grpcweb'
version = '0.2.0'
if (!project.hasProperty("release")) {
version += '-SNAPSHOT'
}
repositories repos
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
jar {
manifest {
attributes(
'Implementation-Version': rootProject.version,
'Implementation-Title': rootProject.name,
'Created-By': "Gradle ${gradle.gradleVersion}",
'Build-Jdk': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
'Build-OS': "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}"
)
}
}
test {
useJUnitPlatform()
}
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
javadoc.failOnError = false
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
archiveClassifier.set('javadoc')
}
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
archiveClassifier.set('sources')
}
artifacts {
archives sourcesJar
archives javadocJar
}
dependencies {
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: "$kotlin_version"
implementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: "$kotlinxcoroutine_version"
implementation group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-jdk8', version: "$kotlinxcoroutine_version"
implementation group: 'io.github.microutils', name: 'kotlin-logging', version: "$kotlinlogging_version"
implementation group: 'org.slf4j', name: 'slf4j-api', version: "$slf4j_version"
api group: 'io.ktor', name: 'ktor-server-core', version: "$ktor_version"
implementation group: 'io.grpc', name: 'grpc-protobuf', version: "$grpc_version"
api group: 'io.grpc', name: 'grpc-core', version: "$grpc_version"
testImplementation group: 'org.assertj', name: 'assertj-core', version: "$assertj_version"
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: "$junit5_version"
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: "$junit5_version"
testRuntimeOnly group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: "$log4jslf4j_version"
testImplementation group: 'io.mockk', name: 'mockk', version: "$mockk_version"
testImplementation group: 'org.awaitility', name: 'awaitility', version: "$awaitility_version"
testImplementation group: 'org.awaitility', name: 'awaitility-kotlin', version: "$awaitility_version"
testImplementation group: 'io.ktor', name: 'ktor-server-netty', version: "$ktor_version"
testImplementation group: 'io.ktor', name: 'ktor-http', version: "$ktor_version"
testImplementation group: 'io.ktor', name: 'ktor-client-cio', version: "$ktor_version"
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar {
archiveClassifier.set("sources")
}
artifact javadocJar {
archiveClassifier.set("javadoc")
}
groupId project.group
artifactId project.name
version project.version
pom {
name = 'Embedded Ktor gRPC Web proxy'
description = 'An embedded gRPC Web proxy for Ktor.'
url = 'https://github.com/blachris/ktor-grpcweb'
licenses {
license {
name = "The Apache Software License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
scm {
connection = 'scm:git:https://github.com/blachris/grpcweb.git'
developerConnection = 'scm:git:https://github.com/blachris/ktor-grpcweb.git'
url = 'https://github.com/blachris/ktor-grpcweb'
}
developers {
developer {
id = 'blachris'
name = 'Christopher Schwarzer'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
}
if (project.hasProperty('signing.keyId') && project.hasProperty('signing.password') && project.hasProperty('signing.secretKeyRingFile')) {
signing {
sign publishing.publications.mavenJava
}
}