forked from ktorio/ktor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
93 lines (75 loc) · 2.96 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
buildscript {
ext.kotlin_repository = {
if (kotlin_version.endsWith('-SNAPSHOT')) return 'https://oss.sonatype.org/content/repositories/snapshots'
return 'http://dl.bintray.com/kotlin/kotlin-eap'
}()
repositories {
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
maven { url kotlin_repository }
maven { url 'https://dl.bintray.com/jetbrains/kotlin-native-dependencies' }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$bintray_plugin_version"
classpath 'net.researchgate:gradle-release:2.4.0'
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:$kotlin_native_version"
classpath "org.jetbrains.kotlinx:atomicfu-gradle-plugin:$atomic_fu_version"
classpath "com.moowork.gradle:gradle-node-plugin:$gradle_node_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
}
}
apply plugin: 'net.researchgate.release'
ext.configuredVersion = project.hasProperty('releaseVersion') ? project.releaseVersion : project.version
ext.dokkaExcludes = [
'ktor-server',
'ktor-samples',
'ktor-features',
'ktor-client'
]
ext.globalM2 = "$buildDir/m2"
ext.publishLocal = project.hasProperty('publishLocal')
apply from: 'gradle/platform.gradle'
allprojects {
def platform = platformOf(project)
group = 'io.ktor'
version = configuredVersion
repositories {
mavenLocal()
maven { url 'https://dl.bintray.com/kotlin/kotlinx/' }
maven { url kotlin_repository }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
jcenter()
}
apply plugin: "kotlin-platform-${platform}"
apply from: rootProject.file("gradle/atomicfu-${platform}.gradle")
apply from: rootProject.file("gradle/${platform}.gradle")
apply from: rootProject.file('gradle/publish.gradle')
if (project.parent != null && project.parent.name == 'ktor-server') {
apply from: rootProject.file('gradle/engines.gradle')
}
task sourceJar(type: Jar, dependsOn: classes) {
classifier 'sources'
if (platform != 'native') {
from sourceSets.main.kotlin
duplicatesStrategy DuplicatesStrategy.EXCLUDE
def platformSrc = sourceSets.main.allSource
def commonSrc = rootProject.sourceSets.main.allSource
from(platformSrc + commonSrc)
}
}
task emptyJar(type: Jar) {
classifier 'javadoc'
}
tasks.build.dependsOn(['sourceJar', 'emptyJar'])
}
release {
scmAdapters = [net.researchgate.release.GitAdapter]
git {
requireBranch = 'gradle-build'
}
}
afterReleaseBuild.dependsOn bintrayUpload