This repository has been archived by the owner on Feb 7, 2020. It is now read-only.
/
build.gradle
75 lines (61 loc) · 1.78 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
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'
def VERSION_CODE = 1
def VERSION_NAME = '2.1.0'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
resourcePrefix 'issuereporter_'
defaultConfig {
minSdkVersion 8
targetSdkVersion 22
versionCode VERSION_CODE
versionName VERSION_NAME
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
encoding = 'UTF-8'
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
android {
lintOptions {
abortOnError false
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:22.0.0'
}
//bintray-publish
publish {
userOrg = 'cookpad-inc'
groupId = 'com.cookpad.android'
artifactId = 'issue-reporter'
publishVersion = VERSION_NAME
desc = 'A gradle plugin to report android application issue'
website = 'https://github.com/cookpad/issue-reporter-android'
}
//releng
def git(String command) {
def proc = ["sh", "-c", "cd ${project.rootDir} ; git ${command}"].execute()
if (proc.waitFor() != 0) {
throw new GradleException(proc.err.text.trim())
}
return proc.in.text;
}
task 'releng' << {
def timestamp = new Date().format("yyyyMMddHHmm")
def tag = "v${android.defaultConfig.versionName}-${timestamp}"
println "[releng] making a release engineering for $tag (${git('rev-parse HEAD').trim()}))"
println "[releng] git tag $tag"
git "tag $tag"
println "[releng] git push origin $tag"
git "push origin $tag"
}