-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy pathbuild.gradle
97 lines (96 loc) · 2.84 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
}
}
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'com.jfrog.bintray'
[compileJava, compileTestJava, compileGroovy]*.options*.encoding = 'UTF-8'
sourceCompatibility = 1.6
targetCompatibility = 1.6
dependencies {
compile gradleApi()
compile localGroovy()
compile fileTree(dir: 'libs', include: ['*.jar'])
// compile "com.android.tools.build:transform-api:1.5.0"
compile "com.android.tools.build:gradle:2.0.0"
compile "commons-io:commons-io:1.4"
}
repositories {
mavenCentral()
}
group = 'com.bryansharp'
version = '1.2.8'
uploadArchives {
version = version + '-SNAPSHOT'//if you are testing the demo I provide locally, you can uncomment this.
repositories {
mavenDeployer {
repository(url: uri('./repo'))
snapshotRepository(url: uri('./snapshotRepo'))
}
}
}
def siteUrl = 'https://github.com/BryanSharp/hibeaver' // project homepage
def gitUrl = 'https://github.com/BryanSharp/hibeaver.git' // project git
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'jar'
name 'HiBeaver'
url siteUrl
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'BryanSharp'
name 'BryanSharp'
email '[email protected]'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
task sourcesJar(type: Jar) {
from project.file('src/main/groovy')
classifier = 'sources'
}
artifacts {
archives sourcesJar
}
Properties properties = new Properties()
boolean isHasFile = false
if (project.rootProject.file('local.properties').exists()){
isHasFile = true
properties.load(project.rootProject.file('local.properties').newDataInputStream())
println "1 hasfile:$isHasFile"
}
bintray {
println "hasfile:$isHasFile"
user = isHasFile ? properties.getProperty("bintray.user") : System.getenv("bintray.user")
key = isHasFile ? properties.getProperty("bintray.apikey") : System.getenv("bintray.apikey")
configurations = ['archives']
pkg {
repo = "maven"
name = "HiBeaver"
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
}