-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
79 lines (69 loc) · 1.65 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
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven'
group = 'com.hubble.actors'
version = '1.0.0'
setupPublishingDetails()
jar {
manifest {
attributes 'Implementation-Title': 'KotlinActors',
'Implementation-Version': version
}
}
configurations {
deployJars
}
repositories {
maven {
credentials {
username artifactory_user
password artifactory_password
}
url "${artifactory_contextUrl}/${project.ext.publishingRepo}"
}
jcenter()
mavenCentral()
}
buildscript {
ext.kotlin_version = '1.0.0-beta-1038'
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
dependencies {
compile 'com.google.guava:guava:18.0'
testCompile 'junit:junit:4.12'
deployJars group: 'org.apache.maven.wagon', name: 'wagon-http', version: '2.6'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile "com.google.android:android:4.1.1.4"
}
test {
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
}
}
uploadArchives {
repositories.mavenDeployer {
configuration = configurations.deployJars
repository(url: "${artifactory_contextUrl}/${project.ext.publishingRepo}") {
authentication(userName: "${artifactory_user}", password: "${artifactory_password}")
}
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
def setupPublishingDetails() {
def env = System.getenv('CI_ENV')
if (env == 'RELEASE') {
project.ext.publishingRepo = 'libs-release-local'
return
}
project.ext.publishingRepo = 'libs-snapshot-local'
version = "${version}-SNAPSHOT"
}