-
Notifications
You must be signed in to change notification settings - Fork 668
/
build.gradle
135 lines (114 loc) · 3.4 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
/*
* Copyright 2012 - 2014 Benjamin Weiss
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'android-library'
apply plugin: 'android-maven'
apply plugin: 'signing'
dependencies {
compile 'com.android.support:support-v4:18.0.+'
}
android {
buildToolsVersion '19'
compileSdkVersion 19
defaultConfig {
versionCode 6
versionName "1.8.2"
minSdkVersion 8
targetSdkVersion 19
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
}
group = "de.keyboardsurfer.android.widget"
artifactId = "crouton"
version = "1.8.2"
android.libraryVariants.all { variant ->
def name = variant.buildType.name
if (name.equals(com.android.builder.BuilderConstants.DEBUG)) {
return; // Skip debug builds.
}
task("javadoc${variant.name.capitalize()}", type: Javadoc) {
description "Generates Javadoc for $variant.name."
source = variant.javaCompile.source
ext.androidJar = "${android.plugin.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar"
classpath = files(variant.javaCompile.classpath.files) + files(ext.androidJar)
}
task("bundleJavadoc${variant.name.capitalize()}", type: Jar) {
description "Bundles Javadoc into zip for $variant.name."
classifier = "javadoc"
from tasks["javadoc${variant.name.capitalize()}"]
}
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java
}
task jar(type: Jar) {
from 'build/classes/release'
}
task javadocJar(type: Jar, dependsOn: "javadocRelease") {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
artifacts {
archives sourcesJar
archives javadocJar
archives jar
}
task wrapper(type: Wrapper) {
description "Generates the gradle wrapper"
gradleVersion = "1.10"
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: repositoryUrl) {
authentication(userName: sonatypeUser, password: sonatypePass)
}
pom.project {
inceptionYear '2012'
name 'Crouton'
artifactId 'crouton'
packaging 'jar', 'aar'
description 'Context sensitive notifications for Android'
url 'https://github.com/keyboardsurfer/Crouton'
scm {
url 'scm:git@github.com:keyboardsurfer/Crouton.git'
connection 'scm:git@github.com:keyboardsurfer/Crouton.git'
developerConnection 'scm:git@github.com:keyboardsurfer/Crouton.git'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'keyboardsurfer'
name 'Benjamin Weiss'
}
}
}
}
}
}