-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
88 lines (75 loc) · 1.88 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
buildscript {
ext.kotlin_version = '1.2.31'
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.6.2"
}
}
group 'axelg'
version '0.53.1'
apply plugin: 'kotlin'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
testCompile 'junit:junit:4.12'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
task allJar(type: Jar) {
//Include source files of library into sources folder
into 'sources', { from sourceSets.main.allSource }
//Include all dependencies
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
classifier = 'all'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task withSources(type: Jar) {
//Include source files of library into sources folder
into 'sources', { from sourceSets.main.allSource }
//Include all compiled files without dependencies
from sourceSets.main.output
classifier = 'withsources'
}
artifacts {
archives sourcesJar
archives allJar
archives withSources
}
artifactory {
contextUrl = artifactory_local_url
publish {
repository {
repoKey = artifactory_repo_key
username = artifactory_username
password = artifactory_password
}
defaults {
publications('mavenJava')
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact withSources
}
}
}