Plugin lib upload code repository configuration

This commit is contained in:
rocrocroc 2017-07-01 03:55:08 +08:00
parent 14582523f5
commit 246fb569e4
5 changed files with 93 additions and 5 deletions

View File

@ -14,18 +14,24 @@
* the License.
*/
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}

View File

@ -19,4 +19,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

View File

@ -0,0 +1,81 @@
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
def siteUrl = '' //
def gitUrl = '' // Git仓库的url
version = "2.1.0"
group = 'com.qihoo360.replugin' //
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
artifactId = ""
project {
packaging 'aar'
// Add your description here
name 'RePlugin - A flexible, stable, easy-to-use Android Plug-in Framework' //
url siteUrl
// Set your license
licenses {
license {
name 'Apache License 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0'
}
}
developers {
developer {
id 'qihoo360' //
name 'qihoo360'
email 'replugin@gmail.com'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
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
}
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = ""
key = ""
configurations = ['archives']
pkg {
repo = '' //
name = '' // jcenter
userOrg = ''
desc = 'RePlugin - A flexible, stable, easy-to-use Android Plug-in Framework' //
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
}

View File

@ -17,8 +17,8 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
minSdkVersion 1
@ -43,3 +43,4 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
provided 'com.android.support:appcompat-v7:23.4.0'
}
apply from: 'bintray.gradle'

View File

@ -13,4 +13,4 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
include ':replugin-library'
include ':replugin-plugin-lib'