-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
106 lines (96 loc) · 2.99 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
buildscript {
ext.kotlinVersion = '1.9.10'
ext.ktlintVersion = '1.0.1'
ext.junitVersion = '4.12'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10"
classpath "org.apache.commons:commons-text:1.9"
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'signing'
group = "io.github.tobi2k"
archivesBaseName = "ktlint-gitlab-reporter"
version = "2.0.1"
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compileOnly 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10'
implementation 'com.pinterest.ktlint:ktlint-cli-reporter-core:1.0.1'
implementation 'org.apache.commons:commons-text:1.10.0'
}
jar {
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'ktlint-gitlab-reporter'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'ktlint GitLab reporter'
description = 'A GitLab compatible JSON reporter for ktlint'
url = 'https://github.com/Tobi2K/ktlint-gitlab-reporter'
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id = 'tobi2k'
name = 'Tobias Kalmbach'
email = 'tobias@kalmbach.dev'
}
}
scm {
connection = 'scm:git:git://github.com/Tobi2K/ktlint-gitlab-reporter'
developerConnection = 'scm:git:ssh://github.com:Tobi2K/ktlint-gitlab-reporter.git'
url = 'https://github.com/Tobi2K/ktlint-gitlab-reporter'
}
}
}
}
repositories {
maven {
credentials {
username ossrhUsername
password ossrhPassword
}
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}