Skip to content

Commit 5e01221

Browse files
committed
relesed 1.2.3
1 parent e728e29 commit 5e01221

File tree

4 files changed

+143
-5
lines changed

4 files changed

+143
-5
lines changed

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
VERSION_NAME=1.2.3-SNAPSHOT
2-
VERSION_CODE=7
1+
VERSION_NAME=1.2.3
2+
VERSION_CODE=8
33
GROUP=jp.co.cyberagent.android.gpuimage
44

55
COMPILE_SDK_VERSION=21
6-
BUILD_TOOLS_VERSION=21.0.2
6+
BUILD_TOOLS_VERSION=21.1.2
77
TARGET_SDK_VERSION=21
88
MIN_SDK_VERSION=8
99

library/android-artifacts.gradle

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
task androidJavadocs(type: Javadoc) {
2+
source = android.sourceSets.main.java.srcDirs
3+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
4+
}
5+
6+
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
7+
classifier = 'javadoc'
8+
from androidJavadocs.destinationDir
9+
}
10+
11+
task androidSourcesJar(type: Jar) {
12+
classifier = 'sources'
13+
from android.sourceSets.main.java.sourceFiles
14+
}
15+
16+
task androidJar(type: Jar) {
17+
from 'build/intermediates/classes/release'
18+
}
19+
20+
artifacts {
21+
archives androidSourcesJar
22+
archives androidJavadocsJar
23+
archives androidJar
24+
}

library/build.gradle

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
apply plugin: 'com.android.library'
2-
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
32

43
android {
54
compileSdkVersion COMPILE_SDK_VERSION as int
@@ -38,4 +37,25 @@ android {
3837
lintOptions {
3938
abortOnError false
4039
}
41-
}
40+
41+
android.libraryVariants.all { variant ->
42+
if (variant.buildType.isDebuggable()) {
43+
return; // Skip debug builds.
44+
}
45+
task("javadoc${variant.name.capitalize()}", type: Javadoc) {
46+
description "Generates Javadoc for $variant.name."
47+
source = variant.javaCompile.source
48+
ext.androidJar = System.getenv("ANDROID_HOME") + "/platforms/${android.compileSdkVersion}/android.jar"
49+
classpath = files(variant.javaCompile.classpath.files) + files(ext.androidJar)
50+
}
51+
52+
task("bundleJavadoc${variant.name.capitalize()}", type: Jar) {
53+
description "Bundles Javadoc into zip for $variant.name."
54+
classifier = "javadoc"
55+
from tasks["javadoc${variant.name.capitalize()}"]
56+
}
57+
}
58+
}
59+
60+
apply from: 'android-artifacts.gradle'
61+
apply from: 'central-publish.gradle'

library/central-publish.gradle

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
* Copyright 2013 Chris Banes
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
apply plugin: 'maven'
18+
apply plugin: 'signing'
19+
20+
def isReleaseBuild() {
21+
return VERSION_NAME.contains("SNAPSHOT") == false
22+
}
23+
24+
def getReleaseRepositoryUrl() {
25+
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
26+
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
27+
}
28+
29+
def getSnapshotRepositoryUrl() {
30+
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
31+
: "https://oss.sonatype.org/content/repositories/snapshots/"
32+
}
33+
34+
def getRepositoryUsername() {
35+
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
36+
}
37+
38+
def getRepositoryPassword() {
39+
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
40+
}
41+
42+
afterEvaluate { project ->
43+
uploadArchives {
44+
repositories {
45+
mavenDeployer {
46+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
47+
48+
pom.groupId = GROUP
49+
pom.artifactId = POM_ARTIFACT_ID
50+
pom.version = VERSION_NAME
51+
52+
repository(url: getReleaseRepositoryUrl()) {
53+
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
54+
}
55+
snapshotRepository(url: getSnapshotRepositoryUrl()) {
56+
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
57+
}
58+
59+
pom.project {
60+
name POM_NAME
61+
packaging POM_PACKAGING
62+
description POM_DESCRIPTION
63+
url POM_URL
64+
65+
scm {
66+
url POM_SCM_URL
67+
connection POM_SCM_CONNECTION
68+
developerConnection POM_SCM_DEV_CONNECTION
69+
}
70+
71+
licenses {
72+
license {
73+
name POM_LICENCE_NAME
74+
url POM_LICENCE_URL
75+
distribution POM_LICENCE_DIST
76+
}
77+
}
78+
79+
developers {
80+
developer {
81+
id POM_DEVELOPER_ID
82+
name POM_DEVELOPER_NAME
83+
}
84+
}
85+
}
86+
}
87+
}
88+
}
89+
90+
signing {
91+
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
92+
sign configurations.archives
93+
}
94+
}

0 commit comments

Comments
 (0)