forked from bugsnag/bugsnag-android-gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
145 lines (125 loc) · 3.7 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
}
}
// Gradle plugins
plugins {
id 'groovy'
id 'com.gradle.plugin-publish' version '0.9.7'
id 'com.bmuschko.nexus' version '2.3.1'
id 'com.jfrog.bintray' version '1.8.4'
}
apply plugin: 'maven-publish'
allprojects {
repositories {
jcenter()
google()
}
}
// Repositories for dependencies
repositories {
jcenter()
google()
}
// Target Java 1.6 when compiling groovy code
compileGroovy {
sourceCompatibility = '1.6'
targetCompatibility = '1.6'
}
// Build dependencies
dependencies {
compile gradleApi()
compile localGroovy()
compile 'com.android.tools.build:gradle:3.1.0'
compile 'org.apache.httpcomponents:httpclient:4.5.2'
compile 'org.apache.httpcomponents:httpmime:4.5.2'
testCompile 'junit:junit:4.12'
}
// Maven publishing settings (nexus-maven-plugins)
modifyPom {
project {
name 'Bugsnag Android Gradle Plugin'
description 'Gradle plugin to automatically upload ProGuard mapping files to Bugsnag.'
url 'https://github.com/bugsnag/bugsnag-android-gradle-plugin'
scm {
url 'https://github.com/bugsnag/bugsnag-android-gradle-plugin'
connection 'scm:git:git://github.com/bugsnag/bugsnag-android-gradle-plugin.git'
developerConnection 'scm:git:ssh://[email protected]/bugsnag/bugsnag-android-gradle-plugin.git'
}
licenses {
license {
name 'MIT'
url 'http://opensource.org/licenses/MIT'
distribution 'repo'
}
}
organization {
name 'Bugsnag'
url 'https://bugsnag.com'
}
developers {
developer {
id 'loopj'
name 'James Smith'
email '[email protected]'
}
}
}
}
// Gradle plugin publishing settings (plugins.gradle.com)
pluginBundle {
website = 'https://github.com/bugsnag/bugsnag-android-gradle-plugin'
vcsUrl = 'https://github.com/bugsnag/bugsnag-android-gradle-plugin.git'
plugins {
androidGradlePlugin {
id = 'com.bugsnag.android.gradle'
displayName = 'Bugsnag Android Gradle Plugin'
description = 'Gradle plugin to automatically upload ProGuard mapping files to Bugsnag.'
tags = ['bugsnag', 'proguard', 'android', 'upload']
}
}
mavenCoordinates {
groupId = 'com.bugsnag'
artifactId = 'bugsnag-android-gradle-plugin'
}
}
install {
version = project.hasProperty("localVersion") ? project.getProperty("localVersion") : project.version
}
publishing {
publications {
Publication(MavenPublication) {
artifact jar
groupId 'com.bugsnag'
artifactId 'bugsnag-android-gradle-plugin'
version project.version
}
}
}
// Bintray upload
bintray {
user = project.hasProperty("bintray_user") ? "$bintray_user" : System.getenv("bintray_user")
key = project.hasProperty("bintray_api_key") ? "$bintray_api_key" : System.getenv("bintray_api_key")
publications = ['Publication']
configurations = ['archives']
pkg {
repo = 'maven'
name = 'bugsnag-android-gradle-plugin'
userOrg = 'bugsnag'
licenses = ['MIT']
vcsUrl = 'https://github.com/bugsnag/bugsnag-android-gradle-plugin.git'
version {
name = project.version
vcsTag = "v${project.version}"
attributes = ['gradle-plugin': "com.bugsnag.android.gradle"]
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
}