diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index 39c8c50..1f16762 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -41,5 +41,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/AppGradle/app.gradle b/AppGradle/app.gradle
new file mode 100755
index 0000000..121d460
--- /dev/null
+++ b/AppGradle/app.gradle
@@ -0,0 +1,29 @@
+ext {
+
+ androidBuildToolsVersion = "29.0.0"
+ androidMinSdkVersion = 17
+ androidTargetSdkVersion = 29
+ androidCompileSdkVersion = 29
+
+
+ constraintLayoutVersion = '1.1.3'
+ appcompatVersion = '1.2.0'
+ annotationVersion = '1.1.0'
+ cardviewVersion = '1.0.0'
+ mediaVersion = '1.0.1'
+ recyclerviewVersion = '1.1.0'
+ swiperefreshlayoutVersion = '1.0.0'
+
+ /**主app-start*/
+ AppDependencies = [
+ constraintLayout : "androidx.constraintlayout:constraintlayout:${constraintLayoutVersion}",
+ appcompat : "androidx.appcompat:appcompat:${appcompatVersion}",
+ annotation : "androidx.annotation:annotation:${annotationVersion}",
+ cardview : "androidx.cardview:cardview:${cardviewVersion}",
+ media : "androidx.media:media:${mediaVersion}",
+ recyclerview : "androidx.recyclerview:recyclerview:${recyclerviewVersion}",
+ swiperefreshlayout : "androidx.swiperefreshlayout:swiperefreshlayout:${swiperefreshlayoutVersion}",
+
+ ]
+
+}
\ No newline at end of file
diff --git a/PhotoCoverLib/build.gradle b/PhotoCoverLib/build.gradle
index 0b260b7..8e7488a 100644
--- a/PhotoCoverLib/build.gradle
+++ b/PhotoCoverLib/build.gradle
@@ -1,11 +1,15 @@
apply plugin: 'com.android.library'
+apply from: rootProject.projectDir.absolutePath + "/AppGradle/app.gradle"
+apply plugin: 'com.github.dcendents.android-maven'
+
android {
- compileSdkVersion 29
+ compileSdkVersion project.ext.androidCompileSdkVersion
+ buildToolsVersion project.ext.androidBuildToolsVersion
defaultConfig {
- minSdkVersion 17
- targetSdkVersion 29
+ minSdkVersion project.ext.androidMinSdkVersion
+ targetSdkVersion project.ext.androidTargetSdkVersion
versionCode 1
versionName "1.0"
}
@@ -21,124 +25,9 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'androidx.recyclerview:recyclerview:1.1.0'
+ implementation project.ext.AppDependencies['appcompat']
+ implementation project.ext.AppDependencies['recyclerview']
}
-/** 以下开始是将Android Library上传到jcenter的相关配置**/
-apply plugin: 'com.github.dcendents.android-maven'
-apply plugin: 'com.jfrog.bintray'
-
-//项目主页
-def siteUrl = 'https://github.com/yangchong211/YCPhotoCover' // project homepage
-//项目的版本控制地址
-def gitUrl = 'https://github.com/yangchong211/YCPhotoCover.git' // project git
-
-//发布到组织名称名字,必须填写
-group = "cn.yc"
-//发布到JCenter上的项目名字,必须填写
-def libName = "YCPhotoCoverLib"
-// 版本号,下次更新是只需要更改版本号即可
-version = "1.0.0"
-
-//生成源文件
-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))
- options.encoding "UTF-8"
- options.charSet 'UTF-8'
- options.author true
- options.version true
- options.links "https://github.com/linglongxin24/FastDev/tree/master/mylibrary/docs/javadoc"
- failOnError false
-}
-
-//文档打包成jar
-task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
-}
-//拷贝javadoc文件
-task copyDoc(type: Copy) {
- from "${buildDir}/docs/"
- into "docs"
-}
-
-//上传到jcenter所需要的源码文件
-artifacts {
- archives javadocJar
- archives sourcesJar
-}
-
-// 配置maven库,生成POM.xml文件
-install {
- repositories.mavenInstaller {
- // This generates POM.xml with proper parameters
- pom {
- project {
- packaging 'aar'
- //项目描述,自由填写
- name 'This is photo cover lib'
- 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 'yangchong'
- name 'yc'
- email 'yangchong211@163.com'
- }
- }
- scm {
- connection gitUrl
- developerConnection gitUrl
- url siteUrl
- }
- }
- }
- }
-}
-
-//上传到jcenter
-Properties properties = new Properties()
-properties.load(project.rootProject.file('local.properties').newDataInputStream())
-bintray {
- user = properties.getProperty("bintray.user") //读取 local.properties 文件里面的 bintray.user
- key = properties.getProperty("bintray.apikey") //读取 local.properties 文件里面的 bintray.apikey
- configurations = ['archives']
- pkg {
- repo = "maven"
- name = libName //发布到JCenter上的项目名字,必须填写
- desc = 'android photo cover' //项目描述
- websiteUrl = siteUrl
- vcsUrl = gitUrl
- licenses = ["Apache-2.0"]
- publish = true
- }
-}
-
-javadoc {
- options {
- //如果你的项目里面有中文注释的话,必须将格式设置为UTF-8,不然会出现乱码
- encoding "UTF-8"
- charSet 'UTF-8'
- author true
- version true
- links "http://docs.oracle.com/javase/7/docs/api"
- }
-}
-
-
diff --git a/PhotoCoverLib/src/main/java/com/yc/cn/cover/CoverLayoutManger.java b/PhotoCoverLib/src/main/java/com/yc/cover/CoverLayoutManger.java
similarity index 99%
rename from PhotoCoverLib/src/main/java/com/yc/cn/cover/CoverLayoutManger.java
rename to PhotoCoverLib/src/main/java/com/yc/cover/CoverLayoutManger.java
index c882ba5..2b37da9 100755
--- a/PhotoCoverLib/src/main/java/com/yc/cn/cover/CoverLayoutManger.java
+++ b/PhotoCoverLib/src/main/java/com/yc/cover/CoverLayoutManger.java
@@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-package com.yc.cn.cover;
+package com.yc.cover;
import android.animation.Animator;
import android.animation.ValueAnimator;
diff --git a/PhotoCoverLib/src/main/java/com/yc/cn/cover/CoverRecyclerView.java b/PhotoCoverLib/src/main/java/com/yc/cover/CoverRecyclerView.java
similarity index 99%
rename from PhotoCoverLib/src/main/java/com/yc/cn/cover/CoverRecyclerView.java
rename to PhotoCoverLib/src/main/java/com/yc/cover/CoverRecyclerView.java
index 5016d6a..527adfa 100755
--- a/PhotoCoverLib/src/main/java/com/yc/cn/cover/CoverRecyclerView.java
+++ b/PhotoCoverLib/src/main/java/com/yc/cover/CoverRecyclerView.java
@@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-package com.yc.cn.cover;
+package com.yc.cover;
import android.content.Context;
import androidx.annotation.NonNull;
diff --git a/RefreshViewLib/build.gradle b/RefreshViewLib/build.gradle
index 2dcba3f..a402767 100644
--- a/RefreshViewLib/build.gradle
+++ b/RefreshViewLib/build.gradle
@@ -1,12 +1,14 @@
apply plugin: 'com.android.library'
+apply from: rootProject.projectDir.absolutePath + "/AppGradle/app.gradle"
+apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 29
- buildToolsVersion "29.0.0"
+ compileSdkVersion project.ext.androidCompileSdkVersion
+ buildToolsVersion project.ext.androidBuildToolsVersion
defaultConfig {
- minSdkVersion 17
- targetSdkVersion 29
+ minSdkVersion project.ext.androidMinSdkVersion
+ targetSdkVersion project.ext.androidTargetSdkVersion
versionCode 13
versionName "2.5.9"
}
@@ -22,123 +24,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'androidx.recyclerview:recyclerview:1.1.0'
- implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
-}
-
-
-/** 以下开始是将Android Library上传到jcenter的相关配置**/
-apply plugin: 'com.github.dcendents.android-maven'
-apply plugin: 'com.jfrog.bintray'
-
-//项目主页
-def siteUrl = 'https://github.com/yangchong211/YCRefreshView' // project homepage
-//项目的版本控制地址
-def gitUrl = 'https://github.com/yangchong211/YCRefreshView.git' // project git
-
-//发布到组织名称名字,必须填写
-group = "org.yczbj"
-//发布到JCenter上的项目名字,必须填写
-def libName = "YCRefreshViewLib"
-// 版本号,下次更新是只需要更改版本号即可
-version = "2.5.9"
-/** 上面配置后上传至jcenter后的编译路径是这样的: compile 'cn.yc:YCRefreshViewLib:2.5' **/
-
-//生成源文件
-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))
- options.encoding "UTF-8"
- options.charSet 'UTF-8'
- options.author true
- options.version true
- options.links "https://github.com/linglongxin24/FastDev/tree/master/mylibrary/docs/javadoc"
- failOnError false
-}
-
-//文档打包成jar
-task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
-}
-//拷贝javadoc文件
-task copyDoc(type: Copy) {
- from "${buildDir}/docs/"
- into "docs"
-}
-
-//上传到jcenter所需要的源码文件
-artifacts {
- archives javadocJar
- archives sourcesJar
-}
-
-// 配置maven库,生成POM.xml文件
-install {
- repositories.mavenInstaller {
- // This generates POM.xml with proper parameters
- pom {
- project {
- packaging 'aar'
- //项目描述,自由填写
- name 'This is refresh view'
- 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 'yangchong'
- name 'yc'
- email 'yangchong211@163.com'
- }
- }
- scm {
- connection gitUrl
- developerConnection gitUrl
- url siteUrl
- }
- }
- }
- }
-}
-
-//上传到jcenter
-Properties properties = new Properties()
-properties.load(project.rootProject.file('local.properties').newDataInputStream())
-bintray {
- user = properties.getProperty("bintray.user") //读取 local.properties 文件里面的 bintray.user
- key = properties.getProperty("bintray.apikey") //读取 local.properties 文件里面的 bintray.apikey
- configurations = ['archives']
- pkg {
- repo = "maven"
- name = libName //发布到JCenter上的项目名字,必须填写
- desc = 'android refresh view' //项目描述
- websiteUrl = siteUrl
- vcsUrl = gitUrl
- licenses = ["Apache-2.0"]
- publish = true
- }
-}
-
-javadoc {
- options {
- //如果你的项目里面有中文注释的话,必须将格式设置为UTF-8,不然会出现乱码
- encoding "UTF-8"
- charSet 'UTF-8'
- author true
- version true
- links "http://docs.oracle.com/javase/7/docs/api"
- }
+ implementation project.ext.AppDependencies['recyclerview']
+ implementation project.ext.AppDependencies['swiperefreshlayout']
}
diff --git a/SelectViewLib/build.gradle b/SelectViewLib/build.gradle
index e919040..12967eb 100644
--- a/SelectViewLib/build.gradle
+++ b/SelectViewLib/build.gradle
@@ -1,14 +1,16 @@
plugins {
id 'com.android.library'
}
+apply from: rootProject.projectDir.absolutePath + "/AppGradle/app.gradle"
+apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 29
- buildToolsVersion "29.0.0"
+ compileSdkVersion project.ext.androidCompileSdkVersion
+ buildToolsVersion project.ext.androidBuildToolsVersion
defaultConfig {
- minSdkVersion 17
- targetSdkVersion 29
+ minSdkVersion project.ext.androidMinSdkVersion
+ targetSdkVersion project.ext.androidTargetSdkVersion
versionCode 1
versionName "1.0"
@@ -25,124 +27,8 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'androidx.annotation:annotation:1.1.0'
- implementation 'androidx.recyclerview:recyclerview:1.1.0'
-}
-
-
-/** 以下开始是将Android Library上传到jcenter的相关配置**/
-apply plugin: 'com.github.dcendents.android-maven'
-apply plugin: 'com.jfrog.bintray'
-
-//项目主页
-def siteUrl = 'https://github.com/yangchong211/YCRefreshView' // project homepage
-//项目的版本控制地址
-def gitUrl = 'https://github.com/yangchong211/YCRefreshView.git' // project git
-
-//发布到组织名称名字,必须填写
-group = "cn.yc"
-//发布到JCenter上的项目名字,必须填写
-def libName = "YCRecycleViewLib"
-// 版本号,下次更新是只需要更改版本号即可
-version = "1.1"
-/** 上面配置后上传至jcenter后的编译路径是这样的: compile 'cn.yc:YCRefreshViewLib:2.5' **/
-
-//生成源文件
-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))
- options.encoding "UTF-8"
- options.charSet 'UTF-8'
- options.author true
- options.version true
- options.links "https://github.com/linglongxin24/FastDev/tree/master/mylibrary/docs/javadoc"
- failOnError false
-}
-
-//文档打包成jar
-task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
-}
-//拷贝javadoc文件
-task copyDoc(type: Copy) {
- from "${buildDir}/docs/"
- into "docs"
-}
-
-//上传到jcenter所需要的源码文件
-artifacts {
- archives javadocJar
- archives sourcesJar
-}
-
-// 配置maven库,生成POM.xml文件
-install {
- repositories.mavenInstaller {
- // This generates POM.xml with proper parameters
- pom {
- project {
- packaging 'aar'
- //项目描述,自由填写
- name 'This is refresh view'
- 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 'yangchong'
- name 'yc'
- email 'yangchong211@163.com'
- }
- }
- scm {
- connection gitUrl
- developerConnection gitUrl
- url siteUrl
- }
- }
- }
- }
-}
-
-//上传到jcenter
-Properties properties = new Properties()
-properties.load(project.rootProject.file('local.properties').newDataInputStream())
-bintray {
- user = properties.getProperty("bintray.user") //读取 local.properties 文件里面的 bintray.user
- key = properties.getProperty("bintray.apikey") //读取 local.properties 文件里面的 bintray.apikey
- configurations = ['archives']
- pkg {
- repo = "maven"
- name = libName //发布到JCenter上的项目名字,必须填写
- desc = 'android YCRecycleViewLib' //项目描述
- websiteUrl = siteUrl
- vcsUrl = gitUrl
- licenses = ["Apache-2.0"]
- publish = true
- }
-}
-
-javadoc {
- options {
- //如果你的项目里面有中文注释的话,必须将格式设置为UTF-8,不然会出现乱码
- encoding "UTF-8"
- charSet 'UTF-8'
- author true
- version true
- links "http://docs.oracle.com/javase/7/docs/api"
- }
+ implementation project.ext.AppDependencies['appcompat']
+ implementation project.ext.AppDependencies['annotation']
+ implementation project.ext.AppDependencies['recyclerview']
}
diff --git a/SlideViewLib/build.gradle b/SlideViewLib/build.gradle
index c807a7b..4cde57a 100644
--- a/SlideViewLib/build.gradle
+++ b/SlideViewLib/build.gradle
@@ -1,12 +1,14 @@
apply plugin: 'com.android.library'
+apply from: rootProject.projectDir.absolutePath + "/AppGradle/app.gradle"
+apply plugin: 'com.github.dcendents.android-maven'
android {
- compileSdkVersion 29
- buildToolsVersion "29.0.0"
+ compileSdkVersion project.ext.androidCompileSdkVersion
+ buildToolsVersion project.ext.androidBuildToolsVersion
defaultConfig {
- minSdkVersion 17
- targetSdkVersion 29
+ minSdkVersion project.ext.androidMinSdkVersion
+ targetSdkVersion project.ext.androidTargetSdkVersion
versionCode 1
versionName "1.0"
@@ -23,126 +25,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'androidx.annotation:annotation:1.1.0'
- implementation 'androidx.recyclerview:recyclerview:1.1.0'
-}
-
-
-
-/** 以下开始是将Android Library上传到jcenter的相关配置**/
-
-apply plugin: 'com.github.dcendents.android-maven'
-apply plugin: 'com.jfrog.bintray'
-
-//项目主页
-def siteUrl = 'https://github.com/yangchong211/YCSlideView' // project homepage
-//项目的版本控制地址
-def gitUrl = 'https://github.com/yangchong211/YCSlideView.git' // project git
-
-//发布到组织名称名字,必须填写
-group = "cn.yc"
-//发布到JCenter上的项目名字,必须填写
-def libName = "YCSlideViewLib"
-// 版本号,下次更新是只需要更改版本号即可
-version = "1.1"
-/** 上面配置后上传至jcenter后的编译路径是这样的: compile 'cn.yc:YCSlideViewLib:1.1' **/
-
-//生成源文件
-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))
- options.encoding "UTF-8"
- options.charSet 'UTF-8'
- options.author true
- options.version true
- options.links "https://github.com/linglongxin24/FastDev/tree/master/mylibrary/docs/javadoc"
- failOnError false
-}
-
-//文档打包成jar
-task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
-}
-//拷贝javadoc文件
-task copyDoc(type: Copy) {
- from "${buildDir}/docs/"
- into "docs"
+ implementation project.ext.AppDependencies['appcompat']
+ implementation project.ext.AppDependencies['annotation']
+ implementation project.ext.AppDependencies['recyclerview']
}
-
-//上传到jcenter所需要的源码文件
-artifacts {
- archives javadocJar
- archives sourcesJar
-}
-
-// 配置maven库,生成POM.xml文件
-install {
- repositories.mavenInstaller {
- // This generates POM.xml with proper parameters
- pom {
- project {
- packaging 'aar'
- //项目描述,自由填写
- name 'This is app slide view'
- 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 'yangchong'
- name 'yc'
- email 'yangchong211@163.com'
- }
- }
- scm {
- connection gitUrl
- developerConnection gitUrl
- url siteUrl
- }
- }
- }
- }
-}
-
-//上传到jcenter
-Properties properties = new Properties()
-properties.load(project.rootProject.file('local.properties').newDataInputStream())
-bintray {
- user = properties.getProperty("bintray.user") //读取 local.properties 文件里面的 bintray.user
- key = properties.getProperty("bintray.apikey") //读取 local.properties 文件里面的 bintray.apikey
- configurations = ['archives']
- pkg {
- repo = "maven"
- name = libName //发布到JCenter上的项目名字,必须填写
- desc = 'Android Slide View' //项目描述
- websiteUrl = siteUrl
- vcsUrl = gitUrl
- licenses = ["Apache-2.0"]
- publish = true
- }
-}
-
-javadoc {
- options {
- //如果你的项目里面有中文注释的话,必须将格式设置为UTF-8,不然会出现乱码
- encoding "UTF-8"
- charSet 'UTF-8'
- author true
- version true
- links "http://docs.oracle.com/javase/7/docs/api"
- }
-}
-
diff --git a/SlideViewLib/src/main/AndroidManifest.xml b/SlideViewLib/src/main/AndroidManifest.xml
index a159e23..cd58636 100644
--- a/SlideViewLib/src/main/AndroidManifest.xml
+++ b/SlideViewLib/src/main/AndroidManifest.xml
@@ -1,5 +1,5 @@
+ package="com.yc.slideview">
-