123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- apply plugin: 'com.android.library'
- apply plugin: 'com.github.dcendents.android-maven'
- apply plugin: 'com.jfrog.bintray'
- android {
- compileSdkVersion 27
- defaultConfig {
- minSdkVersion 16
- targetSdkVersion 26
- versionCode 1
- versionName "1.0"
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- }
- dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- testImplementation 'junit:junit:4.12'
- androidTestImplementation 'com.android.support.test:runner:1.0.2'
- androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
- implementation 'com.android.support:appcompat-v7:27.1.1'
- }
- version = "2.6.1"
- def siteUrl = 'https://github.com/zhpanvip/BannerViewPager' // 项目的主页
- def gitUrl = 'https://github.com/zhpanvip/BannerViewPager.git' // Git仓库的url
- group = "com.zhpan.library" // Maven Group ID for the artifact,一般填你唯一的包名
- install {
- repositories.mavenInstaller {
- // This generates POM.xml with proper parameters
- pom {
- project {
- packaging 'aar'
- // Add your description here
- description 'Banner ViewPager for Android'
- name 'Banner ViewPager for Android' //项目描述
- url siteUrl
- // Set your license
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
- }
- }
- developers {
- developer { // 开发者信息
- id 'zhpan'
- name 'zhangpan'
- email 'zhpanvip@outlook.com'
- }
- }
- scm {
- connection gitUrl
- developerConnection gitUrl
- url siteUrl
- }
- }
- }
- }
- }
- task sourcesJar(type: Jar) {
- from android.sourceSets.main.java.srcDirs
- classifier = 'sources'
- }
- task javadoc(type: Javadoc) {
- failOnError false
- }
- task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
- }
- artifacts {
- archives javadocJar
- archives sourcesJar
- }
- 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 = "CircleViewPager" //发布到Bintray的那个仓库里,默认账户有四个库,我们这里上传到maven库
- name = "bannerview" //发布到Bintray上的项目名字
- websiteUrl = siteUrl
- vcsUrl = gitUrl
- licenses = ["Apache-2.0"]
- publish = true
- }
- }
- //提交命令:gradlew bintrayUpload
- // mac ./gradlew bintrayUpload 没有权限使用申请 chmod +x gradlew
|