提交 0f8d4cb1 编写于 作者: T Takeshi Hagikura

Prepare bintray upload settings.

- Adds gradle setting files for bintray and maven
- rename the module name from 'library' to 'flexbox' to match the artifactId

Change-Id: I292d99329c4d44b0e609e90ad88f1373f56e2187
上级 efe2e77d
......@@ -38,7 +38,7 @@ android {
}
dependencies {
compile project(":library")
compile project(":flexbox")
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
compile "com.android.support:design:${rootProject.ext.supportLibVersion}"
......
......@@ -22,7 +22,8 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
......
apply plugin: 'com.jfrog.bintray'
apply from: 'constants.gradle'
group = mavenGroup
version = mavenVersion
bintray {
user = hasProperty('BINTRAY_USER') ? getProperty('BINTRAY_USER') : System.getenv('BINTRAY_USER')
key = hasProperty('BINTRAY_KEY') ? getProperty('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
configurations = [ 'archives' ]
pkg {
repo = projectName
name = mavenArtifactId
userOrg = bintrayOrg
licenses = [ 'Apache-2.0' ]
vcsUrl = "${githubUrl}.git"
version {
name = mavenVersion
released = new Date()
}
}
}
......@@ -15,6 +15,8 @@
*/
apply plugin: 'com.android.library'
apply from: 'maven.gradle'
apply from: 'bintray.gradle'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
......@@ -24,7 +26,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "0.1.0"
versionName "$mavenVersion"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
......
ext {
projectName = 'flexbox-layout'
projectDesc = 'Flexbox for Android'
githubUrl = 'https://github.com/google/flexbox-layout'
mavenGroup = 'com.google.android'
mavenArtifactId = 'flexbox'
mavenVersion = '0.1.0'
bintrayOrg = 'google'
}
apply plugin: 'com.github.dcendents.android-maven'
apply from: 'constants.gradle'
install {
repositories.mavenInstaller {
pom.project {
name projectName
description projectDesc
url githubUrl
inceptionYear '2016'
packaging 'aar'
groupId mavenGroup
artifactId mavenArtifactId
version mavenVersion
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
scm {
connection "${githubUrl}.git"
url githubUrl
}
developers {
developer {
name 'Google'
}
}
}
}
}
......@@ -14,4 +14,4 @@
* limitations under the License.
*/
include ':app', ':library'
include ':app', ':flexbox'
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册