Skip to content

Commit 04822f8

Browse files
committed
Update gradle build.
1 parent 2b4f95b commit 04822f8

File tree

4 files changed

+108
-14
lines changed

4 files changed

+108
-14
lines changed

build.gradle

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ buildscript {
44
}
55

66
dependencies {
7-
classpath 'com.android.tools.build:gradle:0.5.+'
7+
classpath 'com.android.tools.build:gradle:0.6.+'
88
}
99
}
1010

11+
ext.groupId = 'net.simonvt.messagebar'
12+
ext.compileSdkVersion = 18
13+
ext.buildToolsVersion = "18.1.0"
14+
ext.minSdkVersion = 7;
15+
ext.targetSdkVersion = 18;
16+
1117
allprojects {
1218
repositories {
1319
mavenCentral()
@@ -17,9 +23,5 @@ allprojects {
1723
options.encoding = "UTF-8"
1824
}
1925

20-
if (project.hasProperty('libVersion')) {
21-
project.version = project.libVersion
22-
} else {
23-
project.version = 'snapshot'
24-
}
26+
version = '3.0.4-SNAPSHOT'
2527
}

menudrawer-samples/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ android {
1919
}
2020
}
2121

22-
compileSdkVersion 17
23-
buildToolsVersion "18.0"
22+
compileSdkVersion parent.ext.compileSdkVersion
23+
buildToolsVersion parent.ext.buildToolsVersion
2424

2525
defaultConfig {
26-
minSdkVersion 7
27-
targetSdkVersion 18
26+
minSdkVersion parent.ext.minSdkVersion
27+
targetSdkVersion parent.ext.targetSdkVersion
2828
}
2929
}
Binary file not shown.

menudrawer/build.gradle

Lines changed: 96 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
apply plugin: 'android-library'
2+
apply plugin: 'maven'
3+
apply plugin: 'signing'
24

35
android {
46
sourceSets {
@@ -9,11 +11,101 @@ android {
911
}
1012
}
1113

12-
compileSdkVersion 17
13-
buildToolsVersion "18.0"
14+
compileSdkVersion parent.ext.compileSdkVersion
15+
buildToolsVersion parent.ext.buildToolsVersion
1416

1517
defaultConfig {
16-
minSdkVersion 7
17-
targetSdkVersion 18
18+
minSdkVersion parent.ext.minSdkVersion
19+
targetSdkVersion parent.ext.targetSdkVersion
20+
}
21+
}
22+
23+
ext {
24+
artifactId = 'menudrawer'
25+
}
26+
27+
signing {
28+
sign configurations.archives
29+
}
30+
31+
configurations {
32+
archives {
33+
extendsFrom configurations.default
34+
}
35+
}
36+
37+
task androidJavadocs(type: Javadoc) {
38+
source = android.sourceSets.main.allJava
39+
}
40+
41+
task androidJavadocsJar(type: Jar) {
42+
classifier = 'javadoc'
43+
basename = project.artifactId
44+
from androidJavadocs.destinationDir
45+
}
46+
47+
task androidSourcesJar(type: Jar) {
48+
classifier = 'sources'
49+
basename = project.artifactId
50+
from android.sourceSets.main.allSource
51+
}
52+
53+
artifacts {
54+
archives androidSourcesJar
55+
archives androidJavadocsJar
56+
}
57+
58+
uploadArchives {
59+
configuration = configurations.archives
60+
61+
repositories.mavenDeployer {
62+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
63+
64+
repository(url: sonatypeRepo) {
65+
authentication(userName: sonatypeUsername, password: sonatypePassword)
66+
}
67+
68+
pom.groupId = parent.ext.groupId
69+
pom.artifactId = project.ext.artifactId
70+
pom.version = parent.version
71+
72+
pom.project {
73+
name 'MenuDrawer'
74+
packaging 'aar'
75+
description 'A menu drawer implementation which allows dragging of both the content, and the entire window.'
76+
url 'https://github.com/SimonVT/android-menudrawer'
77+
78+
scm {
79+
url 'http://github.com/SimonVT/android-menudrawer/'
80+
connection 'scm:git:git://github.com/SimonVT/android-menudrawer.git'
81+
developerConnection 'scm:git:[email protected]:SimonVT/android-menudrawer.git'
82+
}
83+
84+
licenses {
85+
license {
86+
name 'Apache License Version 2.0'
87+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
88+
distribution 'repo'
89+
}
90+
}
91+
92+
issueManagement {
93+
system 'GitHub Issues'
94+
url 'https://github.com/SimonVT/android-menudrawer/issues'
95+
}
96+
97+
developers {
98+
developer {
99+
id 'simonvt'
100+
name 'Simon Vig Therkildsen'
101+
102+
url 'http://simonvt.net'
103+
timezone '1'
104+
roles {
105+
role 'developer'
106+
}
107+
}
108+
}
109+
}
18110
}
19111
}

0 commit comments

Comments
 (0)