forked from bitstadium/HockeySDK-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (98 loc) · 5.2 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
98
99
100
101
102
103
104
105
106
107
108
109
110
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.novoda:bintray-release:0.5.0'
}
}
allprojects {
repositories {
jcenter()
google()
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
}
}
//The bintray-release plugin doesn't write the following attributes to the artifact's pom.xml:
//Project name, project description,Project URL, License information,SCM URL and Developer information
//These attributes are not required for publishing on bintray/jcenter but they are mandatory
//for publishing on maven central.
//the following ext{} defines variables that will be used in the hook defined for all subprojects
//
//The Hook
//...will generate a new pom.xml after the generatePomFileForMavenPublication-task and BEFORE the
// bintrayUpload-task. We can than sync from bintray to maven central using the bintray web-UI.
//This is part of the readme at https://github.com/novoda/bintray-release
ext {
ARTIFACT_ID = 'HockeySDK'
VERSION_NAME = '5.1.0'
VERSION_CODE = 19
SITE_URL = 'https://github.com/bitstadium/hockeysdk-android'
GIT_URL = 'https://github.com/bitstadium/HockeySDK-Android.git'
BINTRAY_USER = HOCKEYAPP_BINTRAY_USER
GROUP_NAME = 'net.hockeyapp.android'
COMPILE_SDK = 27
IS_UPLOADING = project.getGradle().startParameter.taskNames.any{it.contains('bintrayUpload')}
DESCRIPTION = 'HockeySDK-Android implements support for using HockeyApp in your Android application. The following features are currently supported:\n' +
'\n' +
'Collect crash reports:If your app crashes, a crash log is written to the device\'s storage. If the user starts the app again, they will be asked asked to submit the crash report to HockeyApp. This works for both beta and live apps, i.e. those submitted to Google Play or other app stores. Crash logs contain viable information for you to help resolve the issue. Furthermore, you as a developer can add additional information to the report as well.\n' +
'\n' +
'Update Alpha/Beta apps: The app will check with HockeyApp if a new version for your alpha/beta build is available. If yes, it will show a dialog to users and let them see the release notes, the version history and start the installation process right away. You can even force the installation of certain updates.\n' +
'\n' +
'User Metrics: Understand user behavior to improve your app. Track usage through daily and monthly active users. Monitor crash impacted users. Measure customer engagement through session count. Add custom tracking calls to learn which features your users are actually using. This feature requires a minimum API level of 14 (Android 4.x Ice Cream Sandwich).\n' +
'\n' +
'Feedback: Besides crash reports, collecting feedback from your users from within your app is a great option to help with improving your app. You act on and answer feedback directly from the HockeyApp backend.\n' +
'\n' +
'Authenticate: Identify and authenticate users against your registered testers with the HockeyApp backend.'
}
subprojects {
group = GROUP_NAME
version = VERSION_NAME
if (IS_UPLOADING && project.name in ['hockeysdk']) {
println project.name
apply plugin: 'maven'
gradle.taskGraph.whenReady { taskGraph ->
taskGraph.getAllTasks().find {
it.path == ":$project.name:generatePomFileForReleasePublication"
}.doLast {
file("build/publications/maven/pom-default.xml").delete()
file("build/publications/release/pom-default.xml").delete()
println 'Overriding pom-file to make sure we can sync to maven central!'
pom {
//noinspection GroovyAssignabilityCheck
project {
name "$project.name"
artifactId ARTIFACT_ID
packaging project.name == 'compiler' ? 'jar' : 'aar'
description DESCRIPTION
url SITE_URL
version VERSION_NAME
scm {
url GIT_URL
connection GIT_URL
developerConnection GIT_URL
}
licenses {
license {
name 'MIT'
}
}
developers {
developer {
id 'HockeyApp'
name 'Microsoft Corporation'
email '[email protected]'
}
}
}
}.writeTo("build/publications/maven/pom-default.xml").writeTo("build/publications/release/pom-default.xml")
}
}
}
}