Skip to content

Commit c6f367c

Browse files
author
linuxjava
committed
添加jcenter上传
1 parent 15103b5 commit c6f367c

File tree

5 files changed

+97
-53
lines changed

5 files changed

+97
-53
lines changed

‎app/build.gradle‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ android{
99
targetSdkVersion ANDROID_BUILD_SDK_VERSION
1010
versionCode 1
1111
versionName "1.0"
12-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1312
}
1413
buildTypes{
1514
release{
@@ -22,5 +21,6 @@ android{
2221
dependencies{
2322
compile fileTree(include: ['*.jar'], dir: 'libs')
2423
compile 'com.github.lsjwzh.RecyclerViewPager:lib:v1.1.2'
25-
compile 'com.github.linuxjava:HorizontalRefreshLayout:f316b4d448'
24+
compile project(':lib')
25+
//compile 'xiao.free.horizontalrefreshlayout:lib:v1.0.0'
2626
}

‎build.gradle‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript{
77
dependencies{
88
classpath "com.android.tools.build:gradle:$GRADLE_VERSION"
99

10-
//classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
10+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
1111
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files
@@ -19,6 +19,11 @@ allprojects{
1919
maven{url "https://jitpack.io" }
2020
jcenter()
2121
}
22+
23+
tasks.withType(Javadoc).all{
24+
enabled =false
25+
options.setEncoding('UTF-8')
26+
}
2227
}
2328

2429
task clean(type: Delete){

‎gradle.properties‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ org.gradle.jvmargs=-Xmx1536m
1616
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1717
# org.gradle.parallel=true
1818
#gradle版本
19-
GRADLE_VERSION=2.2.0
19+
GRADLE_VERSION=2.1.0
2020
#目标SDK版本
2121
ANDROID_BUILD_TARGET_SDK_VERSION=19
2222
#编译SDK版本

‎jcenter-push.gradle‎

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
apply plugin: 'com.jfrog.bintray'
2+
apply plugin: 'com.github.dcendents.android-maven'
3+
4+
def siteUrl ="https://github.com/linuxjava/HorizontalRefreshLayout"
5+
def gitUrl ="https://github.com/linuxjava/HorizontalRefreshLayout.git"
6+
7+
group ='xiao.free.horizontalrefreshlayout'// library name
8+
version ='v0.1.0'// version
9+
10+
install{
11+
repositories.mavenInstaller{
12+
// This generates POM.xml with proper paramters
13+
pom{
14+
project{
15+
packaging 'aar'
16+
17+
name 'HorizontalRefreshLayout for Android'//添加项目描述
18+
url siteUrl
19+
20+
licenses{
21+
license{
22+
name 'The Apache Software License, Version 2.0'
23+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
24+
}
25+
}
26+
27+
developers{
28+
developer{
29+
id 'guochangxiao'
30+
name 'guochangxiao'
31+
32+
}
33+
}
34+
35+
scm{
36+
connection gitUrl
37+
developerConnection gitUrl
38+
url siteUrl
39+
}
40+
}
41+
}
42+
}
43+
}
44+
45+
task sourcesJar(type: Jar){
46+
from android.sourceSets.main.java.srcDirs
47+
classifier ='sources'
48+
}
49+
50+
task javadoc(type: Javadoc){
51+
source = android.sourceSets.main.java.srcDirs
52+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
53+
}
54+
55+
task javadocJar(type: Jar, dependsOn: javadoc){
56+
classifier ='javadoc'
57+
from javadoc.destinationDir
58+
}
59+
60+
artifacts{
61+
archives javadocJar
62+
archives sourcesJar
63+
}
64+
65+
Properties properties =newProperties()
66+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
67+
68+
bintray{
69+
user = properties.getProperty("bintray.user")
70+
key = properties.getProperty("bintray.apikey")
71+
72+
configurations = ['archives']
73+
74+
pkg{
75+
repo ="maven"//JCenter上仓储名
76+
name ="horizontalrefreshlayout"//JCenter上的项目中的packageName
77+
websiteUrl = siteUrl
78+
vcsUrl = gitUrl
79+
licenses = ["Apache-2.0"]
80+
publish =true
81+
}
82+
}

‎lib/build.gradle‎

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
apply plugin: 'com.android.library'
2-
//apply plugin: 'com.jfrog.bintray'
3-
apply plugin: 'com.github.dcendents.android-maven'
4-
5-
group='com.github.robinxiao'
62

73
android{
84
compileSdkVersion ANDROID_BUILD_SDK_VERSIONas int
95
buildToolsVersion ANDROID_BUILD_TOOLS_VERSION
6+
resourcePrefix "horizontalrefreshlayout_"
107

118
defaultConfig{
129
minSdkVersion 14
@@ -30,48 +27,8 @@ dependencies{
3027
compile 'com.android.support:appcompat-v7:23.4.0'
3128
}
3229

33-
/*******************************上传maven配置********************************************/
34-
//group = 'xiao.free.horizontalrefreshlayout'// library库包名
35-
//version = '1.0.0'// 版本号
36-
//
37-
//task generateSourcesJar(type: Jar){
38-
// from android.sourceSets.main.java.srcDirs
39-
// classifier = 'sources'
40-
//}
41-
//
42-
//
43-
//task generateJavadocs(type: Javadoc){
44-
// source = android.sourceSets.main.java.srcDirs
45-
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) //使用android.getBootClasspath关联Android SDK类文件
46-
//}
47-
//
48-
//task generateJavadocsJar(type: Jar, dependsOn: generateJavadocs){
49-
// from generateJavadocs.destinationDir
50-
// classifier = 'javadoc'
51-
//}
52-
//
53-
////generateJavadocsJar.dependsOn generateJavadocs
54-
//
55-
//artifacts{
56-
// //archives generateJavadocsJar //原文为generateJavaDocsJar,此处已做矫正,要严格显示大小写
57-
// archives generateSourcesJar
58-
//}
59-
//
60-
//bintray{
61-
// user ='guochangxiao' //在个人中心的路径里可以找到
62-
// key ='6dde4115e9586d6a3bb98d8f3c6401b5dfd09ea9' //上述保存的API key
63-
// pkg{
64-
// repo ='maven' //必须设定一个值,这里选择maven
65-
// name ='xiao.free.horizontalrefreshlayout' //必须,包名
66-
// version{
67-
// name ='1.0.0-first' //版本名称
68-
// desc ='horizontalrefreshlayout' //版本描述
69-
// released =new Date() //上传过程中如果此处报错,可以注释掉此句
70-
// vcsTag ='1.0.0' //版本
71-
// }
72-
// licenses = ['Apache-2.0'] //开源协议
73-
// vcsUrl ='https://github.com/linuxjava/HorizontalRefreshLayout.git' //指定项目git地址
74-
// websiteUrl ='https://github.com/linuxjava/HorizontalRefreshLayout' //项目官网地址
75-
// }
76-
// configurations = ['archives'] //必须为archives
77-
//}
30+
31+
apply from: '../jcenter-push.gradle'
32+
33+
34+

0 commit comments

Comments
(0)