parent
fd1f9791f9
commit
bf492ff687
@ -1,28 +1,20 @@ |
||||
apply plugin: 'com.android.application' |
||||
|
||||
ext { |
||||
PUBLISH_VERSION = '1.2.0' |
||||
PUBLISH_VERSION_CODE = 3 |
||||
SUPPORT_VERSION = '25.1.0' |
||||
TARGET_SDK = 24 |
||||
MIN_SDK = 10 |
||||
BUILD_TOOLS = "24.0.3" |
||||
} |
||||
|
||||
android { |
||||
compileSdkVersion TARGET_SDK |
||||
buildToolsVersion BUILD_TOOLS |
||||
compileSdkVersion project.sdk |
||||
buildToolsVersion project.buildTools |
||||
|
||||
defaultConfig { |
||||
minSdkVersion MIN_SDK |
||||
targetSdkVersion TARGET_SDK |
||||
versionCode PUBLISH_VERSION_CODE |
||||
versionName PUBLISH_VERSION |
||||
minSdkVersion project.minSdk |
||||
targetSdkVersion project.sdk |
||||
|
||||
versionCode 1 |
||||
versionName "1.0" |
||||
} |
||||
} |
||||
|
||||
dependencies { |
||||
compile "com.android.support:appcompat-v7:$SUPPORT_VERSION" |
||||
compile "com.android.support:appcompat-v7:" + project.supportVersion |
||||
compile 'com.jakewharton:butterknife:7.0.1' |
||||
compile project(':camerafragment') |
||||
} |
||||
} |
@ -1,32 +1,54 @@ |
||||
apply plugin: 'com.android.library' |
||||
|
||||
|
||||
ext { |
||||
PUBLISH_VERSION = '0.3.2' |
||||
PUBLISH_VERSION_CODE = 6 |
||||
SUPPORT_VERSION = '25.1.0' |
||||
TARGET_SDK = 24 |
||||
MIN_SDK = 10 |
||||
BUILD_TOOLS = "24.0.3" |
||||
} |
||||
|
||||
android { |
||||
compileSdkVersion TARGET_SDK |
||||
buildToolsVersion BUILD_TOOLS |
||||
compileSdkVersion project.sdk |
||||
buildToolsVersion project.buildTools |
||||
|
||||
defaultConfig { |
||||
minSdkVersion MIN_SDK |
||||
targetSdkVersion TARGET_SDK |
||||
versionCode PUBLISH_VERSION_CODE |
||||
versionName PUBLISH_VERSION |
||||
minSdkVersion project.minSdk |
||||
targetSdkVersion project.sdk |
||||
|
||||
versionCode 1 |
||||
versionName "1.0" |
||||
} |
||||
} |
||||
|
||||
dependencies { |
||||
compile "com.android.support:support-v4:$SUPPORT_VERSION" |
||||
compile "com.android.support:appcompat-v7:$SUPPORT_VERSION" |
||||
compile "com.android.support:support-v4:"+ project.supportVersion |
||||
compile "com.android.support:appcompat-v7:"+ project.supportVersion |
||||
} |
||||
|
||||
task wrapper(type: Wrapper) { |
||||
gradleVersion = '2.4' |
||||
} |
||||
|
||||
|
||||
ext { |
||||
bintrayRepo = 'maven' |
||||
bintrayName = 'CameraFragment' |
||||
orgName = 'florent37' |
||||
|
||||
publishedGroupId = 'com.github.florent37' |
||||
libraryName = 'CameraFragment' |
||||
artifact = 'camerafragment' |
||||
|
||||
libraryDescription = 'CameraFragment' |
||||
|
||||
siteUrl = 'https://github.com/florent37/CameraFragment' |
||||
gitUrl = 'https://github.com/florent37/CameraFragment.git' |
||||
|
||||
libraryVersion = rootProject.ext.libraryVersion |
||||
|
||||
developerId = 'florent37' |
||||
developerName = 'Florent Champigny' |
||||
developerEmail = 'champigny.florent@gmail.com' |
||||
|
||||
licenseName = 'The Apache Software License, Version 2.0' |
||||
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' |
||||
allLicenses = ["Apache-2.0"] |
||||
} |
||||
|
||||
if (project.rootProject.file('local.properties').exists()) { |
||||
apply from: rootProject.file('gradle/install-v1.gradle') |
||||
apply from: rootProject.file('gradle/bintray-android-v1.gradle') |
||||
} |
@ -0,0 +1,52 @@ |
||||
apply plugin: 'com.jfrog.bintray' |
||||
|
||||
version = libraryVersion |
||||
|
||||
task sourcesJar(type: Jar) { |
||||
from android.sourceSets.main.java.srcDirs |
||||
classifier = 'sources' |
||||
} |
||||
|
||||
task javadoc(type: Javadoc) { |
||||
source = android.sourceSets.main.java.srcDirs |
||||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) |
||||
} |
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) { |
||||
classifier = 'javadoc' |
||||
from javadoc.destinationDir |
||||
} |
||||
artifacts { |
||||
archives javadocJar |
||||
archives sourcesJar |
||||
} |
||||
|
||||
// Bintray |
||||
Properties properties = new Properties() |
||||
properties.load(project.rootProject.file('local.properties').newDataInputStream()) |
||||
|
||||
bintray { |
||||
user = properties.getProperty("bintray.user") |
||||
key = properties.getProperty("bintray.apikey") |
||||
|
||||
configurations = ['archives'] |
||||
pkg { |
||||
repo = bintrayRepo |
||||
name = bintrayName |
||||
desc = libraryDescription |
||||
userOrg = orgName |
||||
websiteUrl = siteUrl |
||||
vcsUrl = gitUrl |
||||
licenses = allLicenses |
||||
publish = true |
||||
publicDownloadNumbers = true |
||||
version { |
||||
desc = libraryDescription |
||||
gpg { |
||||
sign = true //Determines whether to GPG sign the files. The default is false |
||||
passphrase = properties.getProperty("bintray.gpg.password") |
||||
//Optional. The passphrase for GPG signing' |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,49 @@ |
||||
apply plugin: 'com.jfrog.bintray' |
||||
|
||||
version = libraryVersion |
||||
|
||||
task sourcesJar(type: Jar) { |
||||
from sourceSets.main.allSource |
||||
classifier = 'sources' |
||||
} |
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) { |
||||
classifier = 'javadoc' |
||||
from javadoc.destinationDir |
||||
} |
||||
artifacts { |
||||
archives javadocJar |
||||
archives sourcesJar |
||||
} |
||||
|
||||
// Bintray |
||||
Properties properties = new Properties() |
||||
properties.load(project.rootProject.file('local.properties').newDataInputStream()) |
||||
|
||||
bintray { |
||||
user = properties.getProperty("bintray.user") |
||||
key = properties.getProperty("bintray.apikey") |
||||
|
||||
configurations = ['archives'] |
||||
pkg { |
||||
repo = bintrayRepo |
||||
name = bintrayName |
||||
desc = libraryDescription |
||||
userOrg = orgName |
||||
websiteUrl = siteUrl |
||||
vcsUrl = gitUrl |
||||
licenses = ['Apache-2.0'] |
||||
publish = true |
||||
publicDownloadNumbers = true |
||||
version { |
||||
desc = libraryDescription |
||||
gpg { |
||||
sign = true //Determines whether to GPG sign the files. The default is false |
||||
passphrase = properties.getProperty("bintray.gpg.password") |
||||
//Optional. The passphrase for GPG signing' |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
//from https://github.com/workarounds/bundler/blob/master/gradle/bintray-java-v1.gradle |
@ -0,0 +1,44 @@ |
||||
apply plugin: 'com.github.dcendents.android-maven' |
||||
|
||||
group = publishedGroupId // Maven Group ID for the artifact |
||||
|
||||
install { |
||||
repositories.mavenInstaller { |
||||
// This generates POM.xml with proper parameters |
||||
pom { |
||||
project { |
||||
packaging 'aar' |
||||
groupId publishedGroupId |
||||
artifactId artifact |
||||
|
||||
// Add your description here |
||||
name libraryName |
||||
description libraryDescription |
||||
url siteUrl |
||||
|
||||
// Set your license |
||||
licenses { |
||||
license { |
||||
name licenseName |
||||
url licenseUrl |
||||
} |
||||
} |
||||
developers { |
||||
developer { |
||||
id developerId |
||||
name developerName |
||||
email developerEmail |
||||
} |
||||
} |
||||
scm { |
||||
connection gitUrl |
||||
developerConnection gitUrl |
||||
url siteUrl |
||||
|
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
//from https://github.com/workarounds/bundler/blob/master/gradle/install-v1.gradle |
Loading…
Reference in new issue