Skip to content

Commit

Permalink
add jcenter gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
yangyufei committed Nov 1, 2018
1 parent 2982786 commit ab2a7b2
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'


// NOTE: Do not place your application dependencies here; they belong
Expand Down
111 changes: 111 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

android {
compileSdkVersion 28
Expand Down Expand Up @@ -32,3 +34,112 @@ dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}




def siteUrl = 'https://github.com/JarvisGG/NestedTouchScrollingLayout'
def gitUrl = 'https://github.com/JarvisGG/NestedTouchScrollingLayout.git'
def libName = "NestedTouchScrollingLayout"

group = "com.jarvis.library.NestedTouchScrollingLayout"
version = "1.0.0"


task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
failOnError false //必须添加以免出错
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
}

task copyDoc(type: Copy) {
from "${buildDir}/docs/"
into "docs"
}

tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}

artifacts {
archives javadocJar
archives sourcesJar
}

install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
name 'Jarvis Android'
description 'This layout is used to support dispatch touch event.'
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 'jarvisgg'
name 'jarvis'
email 'yang4130qq@gmail.com'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}

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 = libName
desc = 'This layout is used to support dispatch touch event.'
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true

version {
name = '1.0'
desc = 'jarvis open library.'
released = new Date()
vcsTag = 'v1.0'
}
}
}

javadoc {
options{
encoding "UTF-8"
charSet 'UTF-8'
author true
version true
links "http://docs.oracle.com/javase/7/docs/api"
}
}

0 comments on commit ab2a7b2

Please sign in to comment.