-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
108 lines (89 loc) · 2.62 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
buildscript {
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
}
}
plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.4.18'
id 'org.jetbrains.kotlin.jvm' version '1.3.10'
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile 'org.codehaus.groovy:groovy-all:2.3.11'
compile "org.jetbrains.kotlin:kotlin-script-runtime:1.3.10"
compile "com.github.holgerbrandl:kscript-annotations:1.2"
compile "com.github.spullara.mustache.java:compiler:0.9.6"
testCompile group: 'junit', name: 'junit', version: '4.12'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs = ["-Xallow-result-return-type"]
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs = ["-Xallow-result-return-type"]
}
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
def ext = [
"groupId" : "com.eymar",
"artifactId": "routines-streamline",
"version" : "0.1-beta3"
]
group "${ext["groupId"]}"
version "${ext["version"]}"
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
groupId "${ext["groupId"]}"
artifactId "${ext["artifactId"]}"
version "${ext["version"]}"
}
}
}
bintray {
Properties properties = new Properties()
def propertiesFile = project.rootProject.file('local.properties')
if (propertiesFile.exists()) {
properties.load(propertiesFile.newDataInputStream())
}
user = properties.getProperty("gpr.user")
key = properties.getProperty("gpr.key")
publications = ['MyPublication']
pkg {
repo = "generic"
name = "${ext["artifactId"]}"
userOrg = "eymar"
licenses = ['MIT']
vcsUrl = "https://github.com/eymar/RoutinesStreamline"
websiteUrl = "https://github.com/eymar/RoutinesStreamline"
issueTrackerUrl = "https://github.com/eymar/RoutinesStreamline/issues"
version {
name = "${ext["version"]}"
released = new Date()
}
}
}
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
}