1
0
mirror of https://github.com/wasabeef/glide-transformations.git synced 2025-07-04 23:42:44 +08:00

setting project

This commit is contained in:
furiya-daichi 2015-01-11 22:43:38 +09:00
parent d6bcd3e857
commit e69dada548
8 changed files with 220 additions and 18 deletions

View File

@ -5,7 +5,8 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.0.0' classpath 'com.android.tools.build:gradle:1.0.+'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files

View File

@ -50,8 +50,7 @@ def getKeyAliasPasswordProperty() {
} }
dependencies { dependencies {
// compile project(':animators') compile project(':transformations')
compile 'com.github.bumptech.glide:glide:3.4.+'
compile 'com.android.support:appcompat-v7:+' compile 'com.android.support:appcompat-v7:+'
compile 'com.squareup.picasso:picasso:+' compile 'com.github.bumptech.glide:glide:3.+'
} }

View File

@ -6,6 +6,7 @@ ARTIFACT_ID=glide-transformations
COMPILE_SDK_VERSION=21 COMPILE_SDK_VERSION=21
BUILD_TOOLS_VERSION=21.1.2 BUILD_TOOLS_VERSION=21.1.2
TARGET_SDK_VERSION=21 TARGET_SDK_VERSION=21
RENDERSCRIPT_TARGET_API=21
MIN_SDK_VERSION=11 MIN_SDK_VERSION=11
POM_DESCRIPTION=which provides simple Tranformations to Glide POM_DESCRIPTION=which provides simple Tranformations to Glide

View File

@ -0,0 +1,24 @@
task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
}
task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}
task androidJar(type: Jar) {
from 'build/intermediates/classes/release'
}
artifacts {
archives androidSourcesJar
archives androidJavadocsJar
archives androidJar
}

View File

@ -0,0 +1,63 @@
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
publishing {
publications {
mavenJava(MavenPublication) {
groupId GROUP
version VERSION_NAME
artifactId ARTIFACT_ID
artifact androidJar
artifact androidJavadocsJar
artifact androidSourcesJar
pom.withXml {
Node root = asNode()
root.appendNode('name', ARTIFACT_ID)
root.appendNode('description', POM_DESCRIPTION)
root.appendNode('url', POM_URL)
def issues = root.appendNode('issueManagement')
issues.appendNode('system', 'github')
issues.appendNode('url', ISSUE_URL)
def scm = root.appendNode('scm')
scm.appendNode('url', POM_SCM_URL)
scm.appendNode('connection', POM_SCM_CONNECTION)
scm.appendNode('developerConnection', POM_SCM_DEV_CONNECTION)
def license = root.appendNode('licenses').appendNode('license')
license.appendNode('name', POM_LICENCE_NAME)
license.appendNode('url', POM_LICENCE_URL)
license.appendNode('distribution', POM_LICENCE_DIST)
}
}
}
}
def getBintrayUserProperty() {
return hasProperty('bintrayUser') ? bintrayUser : ""
}
def getBintrayApiKeyProperty() {
return hasProperty('bintrayApiKey') ? bintrayApiKey : ""
}
bintray {
user = bintrayUserProperty
key = bintrayApiKeyProperty
publications = ['mavenJava']
dryRun = false
publish = false
pkg {
repo = 'maven'
name = ARTIFACT_ID
licenses = ['Apache-2.0']
labels = ['android']
version {
name = VERSION_NAME
vcsTag = VERSION_NAME
}
}
}

View File

@ -1,24 +1,41 @@
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
compileSdkVersion 21 compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion "21.1.2" buildToolsVersion BUILD_TOOLS_VERSION
defaultConfig { defaultConfig {
minSdkVersion 11 minSdkVersion MIN_SDK_VERSION as int
targetSdkVersion 21 targetSdkVersion TARGET_SDK_VERSION as int
versionCode 1 versionCode VERSION_CODE as int
versionName "1.0" versionName VERSION_NAME
} renderscriptTargetApi RENDERSCRIPT_TARGET_API as int
buildTypes { renderscriptSupportModeEnabled true
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
} }
} }
dependencies { dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.github.bumptech.glide:glide:3.+'
compile 'com.android.support:appcompat-v7:21.0.3'
} }
android.libraryVariants.all { variant ->
if (variant.buildType.isDebuggable()) {
return; // Skip debug builds.
}
task("javadoc${variant.name.capitalize()}", type: Javadoc) {
description "Generates Javadoc for $variant.name."
source = variant.javaCompile.source
ext.androidJar = System.getenv("ANDROID_HOME") + "/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()}"]
}
}
apply from: 'android-artifacts.gradle'
apply from: 'central-publish.gradle'
apply from: 'bintray-publish.gradle'

View File

@ -0,0 +1,94 @@
/*
* Copyright 2013 Chris Banes
*
* 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: 'maven'
apply plugin: 'signing'
def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}
def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}
def getSnapshotRepositoryUrl() {
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
: "https://oss.sonatype.org/content/repositories/snapshots/"
}
def getRepositoryUsername() {
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
}
def getRepositoryPassword() {
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
}
afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
pom.groupId = GROUP
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME
repository(url: getReleaseRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
snapshotRepository(url: getSnapshotRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL
scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}
licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
}
}
developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
}
}
}
}
}
}
signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
}

View File

@ -0,0 +1,3 @@
POM_NAME=which provides simple Tranformations to Glide
POM_ARTIFACT_ID=glide-transformations
POM_PACKAGING=aar