forked from akhikhl/wuff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
65 lines (55 loc) · 1.46 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
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 = ''
// 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' ]
}
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'
}
}
}