diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index d38a8cc..9404b4b 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/baseframework/build.gradle b/baseframework/build.gradle index 1fb3dbe..4bf8c18 100644 --- a/baseframework/build.gradle +++ b/baseframework/build.gradle @@ -1,27 +1,89 @@ apply plugin: 'com.android.library' +apply plugin: 'com.github.dcendents.android-maven' +apply plugin: 'com.jfrog.bintray' -android { - compileSdkVersion 27 +def siteUrl = 'https://github.com/kongzue/BaseFramework' //项目在github主页地址 +def gitUrl = 'https://github.com/kongzue/BaseFramework.git' //Git仓库的地址 +group = "com.kongzue.baseframework"//发布aar前缀根节点 +version = "6.1.0"//发布aar的库版本 +android { + compileSdkVersion 27 defaultConfig { minSdkVersion 15 targetSdkVersion 27 - versionCode 1 - versionName "1.0" + versionCode 61 + versionName "6.1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } - buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + lintOptions { + abortOnError false + } +} +install { + repositories.mavenInstaller { + // This generates POM.xml with proper parameters + pom { + project { + packaging 'aar' + name 'dialog'//添加项目描述 + url siteUrl + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + developers { + developer { + id 'myzchh'//设置自己ID + name 'myzchh'//设置自己名字 + email 'myzcxhh@live.cn'//设置自己邮箱 + } + } + scm { + connection gitUrl + developerConnection gitUrl + url siteUrl + } + } + } + } +} +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} + +artifacts { + 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 = "maven" + name = "BaseFramework" //项目在JCenter的名字 + websiteUrl = siteUrl + vcsUrl = gitUrl + licenses = ["Apache-2.0"] + publish = true + } } dependencies { diff --git a/build.gradle b/build.gradle index 1a3d812..b569879 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.1.2' - + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files