forked from kotlin-orm/ktorm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
195 lines (176 loc) · 6.28 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
188
189
190
191
192
193
194
195
buildscript {
ext {
kotlinVersion = "1.4.10"
detektVersion = "1.12.0-RC1"
}
repositories {
jcenter()
gradlePluginPortal()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${detektVersion}"
}
}
allprojects {
group = "me.liuwj.ktorm"
version = "3.1.0"
}
subprojects { project ->
apply plugin: "kotlin"
apply plugin: "maven-publish"
apply plugin: "com.jfrog.bintray"
apply plugin: "io.gitlab.arturbosch.detekt"
apply from: "${project.rootDir}/check-source-header.gradle"
repositories {
jcenter()
}
dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
api "org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}"
testImplementation "junit:junit:4.12"
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:${detektVersion}"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.6"
kotlinOptions.allWarningsAsErrors = true
kotlinOptions.freeCompilerArgs = [
"-Xexplicit-api=strict",
"-Xopt-in=kotlin.RequiresOptIn"
]
}
task generateSourcesJar(type: Jar) {
archiveClassifier = "sources"
from sourceSets.main.allSource
}
task generateJavadoc(type: Jar) {
archiveClassifier = "javadoc"
}
detekt {
toolVersion = detektVersion
config = files("${project.rootDir}/detekt.yml")
reports {
xml.enabled = false
html.enabled = false
}
}
publishing {
publications {
bintray(MavenPublication) {
from components.java
artifact generateSourcesJar
artifact generateJavadoc
groupId project.group
artifactId project.name
version project.version
pom {
name = project.name
description = "A lightweight ORM Framework for Kotlin with strong typed SQL DSL and sequence APIs."
url = "https://github.com/kotlin-orm/ktorm"
licenses {
license {
name = "The Apache Software License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "vincentlauvlwj"
name = "vince"
email = "[email protected]"
}
developer {
id = "waluo"
name = "waluo"
email = "[email protected]"
}
developer {
id = "clydebarrow"
name = "Clyde"
email = "[email protected]"
}
developer {
id = "Ray-Eldath"
name = "Ray Eldath"
email = "[email protected]"
}
developer {
id = "hangingman"
name = "hiroyuki.nagata"
email = "[email protected]"
}
developer {
id = "onXoot"
name = "beetlerx"
email = "[email protected]"
}
developer {
id = "arustleund"
name = "Andrew Rustleund"
email = "[email protected]"
}
developer {
id = "afezeria"
name = "afezeria"
email = "[email protected]"
}
developer {
id = "scorsi"
name = "Sylvain Corsini"
email = "[email protected]"
}
developer {
id = "lyndsysimon"
name = "Lyndsy Simon"
email = "[email protected]"
}
developer {
id = "antonydenyer"
name = "Antony Denyer"
email = "[email protected]"
}
}
scm {
url = "https://github.com/kotlin-orm/ktorm.git"
}
}
}
}
}
bintray {
user = System.getenv("BINTRAY_USER")
key = System.getenv("BINTRAY_KEY")
publications = ["bintray"]
publish = true
pkg {
repo = "maven"
name = project.name
licenses = ["Apache-2.0"]
vcsUrl = "https://github.com/kotlin-orm/ktorm.git"
labels = ["Kotlin", "ORM", "SQL"]
version {
name = project.version
released = new Date()
vcsTag = project.version
mavenCentralSync {
sync = false
user = System.getenv("OSSRH_USER")
password = System.getenv("OSSRH_PASSWORD")
}
}
}
}
}
task printClasspath() {
doLast {
def jars = subprojects.collect { it.configurations.compileClasspath.getFiles() }.flatten().toSet()
jars.removeIf { it.name.contains("ktorm") }
println("Project classpath: ")
jars.each { println(it.name) }
def file = file("build/ktorm.classpath")
file.parentFile.mkdirs()
file.write(jars.collect { it.absolutePath }.join(File.pathSeparator))
println("Classpath written to build/ktorm.classpath")
}
}