-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
120 lines (101 loc) · 3.11 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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false
id "io.codearte.nexus-staging" version "0.30.0"
id "com.bmuschko.nexus" version "2.3.1" apply false
}
ext {
kotlinVersion = '1.5.30'
coroutinesVersion = '1.5.2'
junitVersion = '5.8.0'
junitRunnerVersion = '1.8.0'
}
group 'dev.zerite.craftlib'
version '0.1.5'
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'signing'
apply plugin: 'com.bmuschko.nexus'
group rootProject.group
version rootProject.version
sourceCompatibility = targetCompatibility = '1.8'
compileJava.options.encoding 'UTF-8'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.junit.platform:junit-platform-runner:$junitRunnerVersion"
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
}
jar {
manifest.attributes(
'Implementation-Title': 'CraftLib',
'Implementation-Version': project.version
)
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
}
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
extraArchive {
sources = true
tests = true
javadoc = true
}
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
}
modifyPom {
project {
name project.name
description project.description
url 'https://zerite.dev/'
inceptionYear '2020'
scm {
url 'https://github.com/zerite/craftlib'
connection 'scm:https://github.com/zerite/craftlib.git'
developerConnection 'scm:git://github.com/zerite/craftlib.git'
}
licenses {
license {
name 'GNU Lesser General Public License v3.0'
url 'https://www.gnu.org/licenses/lgpl-3.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'kodingdev'
name 'Koding Dev'
email '[email protected]'
}
}
}
}
nexus {
sign = true
repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
def profile = project.findProperty('craftlib.stagingProfileId') ?: System.getenv('STAGING_PROFILE_ID')
if (profile != null) {
nexusStaging {
packageGroup = "dev.zerite.craftlib"
stagingProfileId = profile
}
}