-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
101 lines (86 loc) · 3.02 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
plugins {
id 'java'
id 'maven-publish'
id 'signing'
id 'org.jetbrains.kotlin.jvm' version "1.5.31"
id 'io.github.gradle-nexus.publish-plugin' version "1.1.0"
}
group 'com.github.mmauro94'
version '2.0.1'
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31"
implementation 'com.beust:klaxon:5.5'
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.31"
testImplementation "org.jetbrains.kotlin:kotlin-reflect:1.5.31"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
//Requirements in gradle.properties to publish:
// - sonatypeUsername and sonatypePassword variables, with the USER TOKEN (profile page on oss.sonatype.org)
// - generate a private key with `gpg --gen-key`
// - `gpg2 --list-keys` to list keys
// - publish the key with `gpg2 --keyserver hkp://pool.sks-keyservers.net --send-keys XXXXX` where XXXXX is the id of the key
// - signing.keyId, signing.password and signing.secretKeyRingFile variables (use short key id)
// - singing.secretKeyRingFile should be a gpg file, if not present export one with `gpg --export-secret-keys > secring.gpg`
// PUBLISH WITH COMMAND gradle publishToSonatype closeAndReleaseSonatypeStagingRepository
nexusPublishing {
repositories {
sonatype()
}
}
publishing {
publications {
maven(MavenPublication) {
from components.java
pom {
name = "mkvtoolnix-wrapper"
description = "An easy to use light kotlin-jvm wrapper for most common mkvmerge and mkvpropedit CLI commands"
url = "https://github.com/MMauro94/mkvtoolnix-wrapper"
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
distribution = 'repo'
}
}
developers {
developer {
id = 'MMauro94'
name = 'Mauro Molin'
email = '[email protected]'
}
}
scm {
url = 'scm:git:git://github.com/MMauro94/mkvtoolnix-wrapper.git'
connection = 'scm:git:ssh://github.com:MMauro94/mkvtoolnix-wrapper.git'
developerConnection = 'http://github.com/MMauro94/mkvtoolnix-wrapper/tree/master'
}
}
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
signing {
required { !project.version.endsWith("-SNAPSHOT") && !project.hasProperty("skipSigning") }
sign publishing.publications.maven
}