|
1 | 1 | apply plugin: 'com.android.library' |
2 | 2 | apply from: rootProject.projectDir.absolutePath + "/VideoGradle/video.gradle" |
| 3 | +//迁移到jitpack |
| 4 | +apply plugin: 'com.github.dcendents.android-maven' |
3 | 5 |
|
4 | 6 | android { |
5 | 7 | compileSdkVersion project.ext.androidCompileSdkVersion |
6 | 8 | buildToolsVersion project.ext.androidBuildToolsVersion |
7 | 9 | defaultConfig { |
8 | 10 | minSdkVersion project.ext.androidMinSdkVersion |
9 | 11 | targetSdkVersion project.ext.androidTargetSdkVersion |
10 | | - versionCode 36 |
11 | | - versionName "3.0.6" |
| 12 | + versionCode 37 |
| 13 | + versionName "3.0.7" |
12 | 14 | } |
13 | 15 |
|
14 | 16 | buildTypes { |
@@ -46,118 +48,3 @@ dependencies { |
46 | 48 | implementation project(':VideoTool') |
47 | 49 | } |
48 | 50 |
|
49 | | - |
50 | | -/** 以下开始是将Android Library上传到jcenter的相关配置**/ |
51 | | -apply plugin: 'com.github.dcendents.android-maven' |
52 | | -apply plugin: 'com.jfrog.bintray' |
53 | | - |
54 | | -//项目主页 |
55 | | -def siteUrl = 'https://github.com/yangchong211/YCVideoPlayer' // project homepage |
56 | | -//项目的版本控制地址 |
57 | | -def gitUrl = 'https://github.com/yangchong211/YCVideoPlayer.git' // project git |
58 | | - |
59 | | -//发布到组织名称名字,必须填写 |
60 | | -group = "cn.yc" |
61 | | -//发布到JCenter上的项目名字,必须填写 |
62 | | -def libName = "YCVideoKernelLib" |
63 | | -// 版本号,下次更新是只需要更改版本号即可 |
64 | | -version = "3.0.6" |
65 | | -/** 上面配置后上传至jcenter后的编译路径是这样的: compile 'cn.yc:YCVideoKernelLib:1.0.0' **/ |
66 | | - |
67 | | -//生成源文件 |
68 | | -task sourcesJar(type: Jar) { |
69 | | - from android.sourceSets.main.java.srcDirs |
70 | | - classifier = 'sources' |
71 | | -} |
72 | | -//生成文档 |
73 | | -task javadoc(type: Javadoc) { |
74 | | - source = android.sourceSets.main.java.srcDirs |
75 | | - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) |
76 | | - options.encoding "UTF-8" |
77 | | - options.charSet 'UTF-8' |
78 | | - options.author true |
79 | | - options.version true |
80 | | - options.links "https://github.com/linglongxin24/FastDev/tree/master/mylibrary/docs/javadoc" |
81 | | - failOnError false |
82 | | -} |
83 | | - |
84 | | -//文档打包成jar |
85 | | -task javadocJar(type: Jar, dependsOn: javadoc) { |
86 | | - classifier = 'javadoc' |
87 | | - from javadoc.destinationDir |
88 | | -} |
89 | | -//拷贝javadoc文件 |
90 | | -task copyDoc(type: Copy) { |
91 | | - from "${buildDir}/docs/" |
92 | | - into "docs" |
93 | | -} |
94 | | - |
95 | | -//上传到jcenter所需要的源码文件 |
96 | | -artifacts { |
97 | | - archives javadocJar |
98 | | - archives sourcesJar |
99 | | -} |
100 | | - |
101 | | -// 配置maven库,生成POM.xml文件 |
102 | | -install { |
103 | | - repositories.mavenInstaller { |
104 | | - // This generates POM.xml with proper parameters |
105 | | - pom { |
106 | | - project { |
107 | | - packaging 'aar' |
108 | | - //项目描述,自由填写 |
109 | | - name 'This is video kernel lib' |
110 | | - url siteUrl |
111 | | - licenses { |
112 | | - license { |
113 | | - //开源协议 |
114 | | - name 'The Apache Software License, Version 2.0' |
115 | | - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' |
116 | | - } |
117 | | - } |
118 | | - developers { |
119 | | - developer { |
120 | | - //开发者的个人信息,根据个人信息填写 |
121 | | - id 'yangchong' |
122 | | - name 'yc' |
123 | | - email 'yangchong211@163.com' |
124 | | - } |
125 | | - } |
126 | | - scm { |
127 | | - connection gitUrl |
128 | | - developerConnection gitUrl |
129 | | - url siteUrl |
130 | | - } |
131 | | - } |
132 | | - } |
133 | | - } |
134 | | -} |
135 | | - |
136 | | -//上传到jcenter |
137 | | -Properties properties = new Properties() |
138 | | -properties.load(project.rootProject.file('local.properties').newDataInputStream()) |
139 | | -bintray { |
140 | | - user = properties.getProperty("bintray.user") //读取 local.properties 文件里面的 bintray.user |
141 | | - key = properties.getProperty("bintray.apikey") //读取 local.properties 文件里面的 bintray.apikey |
142 | | - configurations = ['archives'] |
143 | | - pkg { |
144 | | - repo = "maven" |
145 | | - name = libName //发布到JCenter上的项目名字,必须填写 |
146 | | - desc = 'android video kernel' //项目描述 |
147 | | - websiteUrl = siteUrl |
148 | | - vcsUrl = gitUrl |
149 | | - licenses = ["Apache-2.0"] |
150 | | - publish = true |
151 | | - } |
152 | | -} |
153 | | - |
154 | | -javadoc { |
155 | | - options { |
156 | | - //如果你的项目里面有中文注释的话,必须将格式设置为UTF-8,不然会出现乱码 |
157 | | - encoding "UTF-8" |
158 | | - charSet 'UTF-8' |
159 | | - author true |
160 | | - version true |
161 | | - links "http://docs.oracle.com/javase/7/docs/api" |
162 | | - } |
163 | | -} |
0 commit comments