-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle
110 lines (97 loc) · 2.74 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
buildscript {
ext.kotlin_version = '1.1.51'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id "com.jfrog.bintray" version "1.7.3"
}
def gitUrl = "https://github.com/vanshg/KrazyKotlin"
def libVersion = '1.0.0'
group 'com.vanshgandhi'
version libVersion
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
}
// Create the pom configuration:
def pomConfig = {
licenses {
license {
name "The MIT License"
url gitUrl + "/blob/master/LICENSE"
distribution "repo"
}
}
developers {
developer {
id "vanshg"
name "Vansh Gandhi"
email "[email protected]"
}
}
scm {
url gitUrl
}
}
// Create the publication with the pom configuration:
publishing {
publications {
BintrayPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId group
artifactId 'krazykotlin'
version libVersion
pom.withXml {
def root = asNode()
root.appendNode('description', 'A collection of useful Kotlin Extension')
root.appendNode('name', 'KrazyKotlin')
root.appendNode('url', gitUrl)
root.children().last() + pomConfig
}
}
}
}
bintray {
user = bintray_user // defined in global gradle.properites (~/.gradle/gradle.properties)
key = bintray_api_key // defined in global gradle.properites (~/.gradle/gradle.properties)
publications = ['BintrayPublication']
pkg {
repo = 'maven'
name = 'KrazyKotlin'
licenses = ['MIT']
vcsUrl = gitUrl + '.git'
issueTrackerUrl = gitUrl + '/issues'
githubRepo = 'vanshg/KrazyKotlin'
githubReleaseNotesFile = 'README.md'
websiteUrl = gitUrl
labels = ['kotlin', 'utilities', 'extension']
version {
name = libVersion
desc = 'A collection of useful Kotlin Extension'
released = new Date()
vcsTag = libVersion
attributes = ['gradle-plugin': 'com.vanshgandhi.krazykotlin']
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testCompile 'junit:junit:4.12'
}