mirror of
https://github.com/wasabeef/glide-transformations.git
synced 2025-07-03 23:12:45 +08:00
setting project
This commit is contained in:
parent
d6bcd3e857
commit
e69dada548
@ -5,7 +5,8 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
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
|
||||
// in the individual module build.gradle files
|
||||
|
@ -50,8 +50,7 @@ def getKeyAliasPasswordProperty() {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// compile project(':animators')
|
||||
compile 'com.github.bumptech.glide:glide:3.4.+'
|
||||
compile project(':transformations')
|
||||
compile 'com.android.support:appcompat-v7:+'
|
||||
compile 'com.squareup.picasso:picasso:+'
|
||||
compile 'com.github.bumptech.glide:glide:3.+'
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ ARTIFACT_ID=glide-transformations
|
||||
COMPILE_SDK_VERSION=21
|
||||
BUILD_TOOLS_VERSION=21.1.2
|
||||
TARGET_SDK_VERSION=21
|
||||
RENDERSCRIPT_TARGET_API=21
|
||||
MIN_SDK_VERSION=11
|
||||
|
||||
POM_DESCRIPTION=which provides simple Tranformations to Glide
|
||||
|
24
transformations/android-artifacts.gradle
Normal file
24
transformations/android-artifacts.gradle
Normal 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
|
||||
}
|
63
transformations/bintray-publish.gradle
Normal file
63
transformations/bintray-publish.gradle
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
@ -1,24 +1,41 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 21
|
||||
buildToolsVersion "21.1.2"
|
||||
compileSdkVersion COMPILE_SDK_VERSION as int
|
||||
buildToolsVersion BUILD_TOOLS_VERSION
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 11
|
||||
targetSdkVersion 21
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
minSdkVersion MIN_SDK_VERSION as int
|
||||
targetSdkVersion TARGET_SDK_VERSION as int
|
||||
versionCode VERSION_CODE as int
|
||||
versionName VERSION_NAME
|
||||
renderscriptTargetApi RENDERSCRIPT_TARGET_API as int
|
||||
renderscriptSupportModeEnabled true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'com.android.support:appcompat-v7:21.0.3'
|
||||
compile 'com.github.bumptech.glide:glide: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'
|
94
transformations/central-publish.gradle
Normal file
94
transformations/central-publish.gradle
Normal 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
|
||||
}
|
||||
}
|
3
transformations/gradle.properties
Normal file
3
transformations/gradle.properties
Normal file
@ -0,0 +1,3 @@
|
||||
POM_NAME=which provides simple Tranformations to Glide
|
||||
POM_ARTIFACT_ID=glide-transformations
|
||||
POM_PACKAGING=aar
|
Loading…
x
Reference in New Issue
Block a user