-
Notifications
You must be signed in to change notification settings - Fork 51
/
build.gradle
70 lines (59 loc) · 1.53 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
buildscript {
repositories {
mavenLocal()
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.1.0'
}
}
apply plugin: 'base' // import clean task
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'
ext {
project_website="https://github.com/${developerId}/${projectId}"
project_scm = "scm:git@github.com:${developerId}/${projectId}.git"
license_url = "https://raw.github.com/${developerId}/${projectId}/master/LICENSE"
}
if( !hasProperty( 'bintrayUser' ) )
ext.bintrayUser = ''
if( !hasProperty( 'bintrayKey' ) )
ext.bintrayKey = ''
task('build')
// we exclude buildExamples from main build,
// because building all examples might be too slow
task('buildExamples', type: GradleBuild) {
dir = file('examples')
tasks = [ 'build' ]
}
// we exclude cleanExamples from main build,
// because cleaning all examples might be too slow
task('cleanExamples', type: GradleBuild) {
dir = file('examples')
tasks = [ 'clean' ]
}
task('wrapper', type: Wrapper) {
gradleVersion = '2.1'
}
artifactory {
contextUrl = 'https://oss.jfrog.org/artifactory'
publish {
repository {
if (project.version.endsWith('-SNAPSHOT'))
repoKey = 'oss-snapshot-local'
else
repoKey = 'oss-release-local'
username = project.bintrayUser
password = project.bintrayKey
}
defaults {
publications 'mavenJava'
}
}
resolve {
repository {
repoKey = 'repo'
}
}
}