This repository has been archived by the owner on Jul 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
executable file
·92 lines (76 loc) · 2 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
buildscript {
ext.kotlinVersion = '1.3.30'
ext.ktlintVersion = '0.32.0'
ext.junitVersion = '4.12'
repositories {
mavenCentral()
}
dependencies {
// noinspection all
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
plugins {
id "com.jfrog.artifactory" version "4.7.2"
id "com.jfrog.bintray" version "1.8.0"
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
group 'me.cassiano'
version '0.2.3'
sourceCompatibility = 1.6
final ciBuild = System.hasProperty('ci')
final localProps = new Properties()
localProps.load(file('local.properties').newDataInputStream())
repositories {
mavenCentral()
}
dependencies {
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
compileOnly "com.pinterest.ktlint:ktlint-core:$ktlintVersion"
testCompile "com.pinterest.ktlint:ktlint-core:$ktlintVersion"
testCompile "junit:junit:$junitVersion"
}
bintray {
if (ciBuild) {
user = System.getenv('bintrayUser')
key = System.getenv('bintrayKey')
} else {
user = localProps.getProperty('bintrayUser')
key = localProps.getProperty('bintrayKey')
}
publications = ['mavenJava']
pkg {
repo = 'maven'
name = 'ktlint-html-reporter'
version {
name = project.version
released = new Date()
vcsTag = "v${project.version}"
}
}
}
task sourcesJar(type: Jar, dependsOn: project.classes) {
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: project.javadoc) {
from javadoc.destinationDir
}
artifacts {
archives sourcesJar, javadocJar
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId project.bintray.pkg.name
from components.java
artifact sourcesJar {
classifier = 'sources'
}
artifact javadocJar {
classifier = 'javadoc'
}
}
}
}