-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
124 lines (93 loc) · 2.59 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
plugins {
id 'maven'
id 'signing'
id 'java-library'
id 'org.jetbrains.dokka' version '1.4.10.2'
id 'org.jetbrains.kotlin.jvm' version '1.4.10'
id 'io.codearte.nexus-staging' version '0.22.0'
}
group 'com.sxtanna.korm'
version '3.4.0'
repositories {
jcenter()
mavenCentral()
}
dependencies {
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10"
testCompile "org.junit.jupiter:junit-jupiter-engine:5.6.0"
testRuntime "org.junit.jupiter:junit-jupiter-engine:5.6.0"
testCompile "org.assertj:assertj-core:3.15.0"
testCompile "com.google.code.gson:gson:2.8.6"
}
sourceSets {
test.compileClasspath += configurations.compileOnly
test.runtimeClasspath += configurations.compileOnly
}
test {
useJUnitPlatform()
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
}
task sourcesJar(type: Jar) {
archiveClassifier.set("sources")
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: dokkaJavadoc) {
archiveClassifier.set("javadoc")
from javadoc.destinationDir
}
dokkaJavadoc {
outputDirectory = javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
signing {
required { gradle.taskGraph.hasTask('uploadArchives') }
sign jar
sign sourcesJar
sign javadocJar
}
nexusStaging {
packageGroup = 'com.sxtanna'
}
uploadArchives {
dependsOn = [clean, signJavadocJar, signSourcesJar, signJar]
def user = project.hasProperty('ossrhUsername') ? ossrhUsername : System.getenv('ossrhUsername')
def pass = project.hasProperty('ossrhPassword') ? ossrhPassword : System.getenv('ossrhPassword')
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: user, password: pass)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: user, password: pass)
}
pom.project {
name project.name
description "Kotlin Object-Relational Mapping"
url "https://github.com/Sxtanna/KORM"
scm {
connection 'scm:git:git://github.com/Sxtanna/KORM.git'
developerConnection 'scm:git:git://github.com/Sxtanna/KORM.git'
url 'https://github.com/Sxtanna/KORM.git'
}
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
name 'Sxtanna'
email '[email protected]'
}
}
}
}
}
}