From 1df866263cad7e2ee291c3a8868a08ae4f2b7316 Mon Sep 17 00:00:00 2001 From: mosect Date: Fri, 2 Apr 2021 15:24:12 +0800 Subject: [PATCH] 1.0.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. jcenter更改成jitpack 2. 更新版本为1.0.5 --- README.md | 11 ++++++- build.gradle | 4 +-- example/build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 3 +- library/build.gradle | 42 +++++++++++++++++------- 5 files changed, 45 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 0217a28..c41a7ab 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,17 @@ Android拖拽布局,包括以下布局: 项目已上传jcenter,可以直接使用maven或gradle引用本库。 ## Gradle +在项目根节点的build.gradle中配置: ``` -implementation 'com.mosect:DragLayout:1.0.4' +allprojects { + repositories { + maven { url 'https://jitpack.io' } + } +} +``` +在需要引入的项目build.gradle中添加 +``` +implementation 'com.github.Mosect:DragLayout:1.0.5' ``` # 更新记录 diff --git a/build.gradle b/build.gradle index 38aa79d..1ba46d0 100644 --- a/build.gradle +++ b/build.gradle @@ -7,8 +7,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.0' - classpath 'com.novoda:bintray-release:0.9' + classpath 'com.android.tools.build:gradle:3.6.4' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -19,6 +18,7 @@ allprojects { repositories { google() jcenter() + maven { url 'https://jitpack.io' } } } diff --git a/example/build.gradle b/example/build.gradle index 7d968a0..24413da 100644 --- a/example/build.gradle +++ b/example/build.gradle @@ -39,5 +39,5 @@ dependencies { implementation 'io.reactivex:rxjava:1.0.14' implementation 'io.reactivex:rxandroid:1.0.1' implementation project(':library') - implementation 'com.mosect:ViewUtils:1.0.5' + implementation 'com.github.Mosect:ViewUtils:1.0.8' } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9a4163a..4ca6b3d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Fri Apr 02 15:20:38 CST 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip diff --git a/library/build.gradle b/library/build.gradle index ee08a1b..84007f4 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,15 +1,5 @@ apply plugin: 'com.android.library' -apply plugin: 'com.novoda.bintray-release' - -publish { - repoName = 'android' // 远程仓库名字,不指明,默认是上传到maven - userOrg = 'mosect' // bintray.com用户名 - groupId = 'com.mosect' // jcenter上的路径,bintray上创建Package时填写的Version control项 - artifactId = 'DragLayout' // 项目名称,bintray上创建Package时填写的Name项 - publishVersion = '1.0.4' // 版本号 - desc = 'DragLayout增加maxScrollTime(xml)和touchScrollable属性' // 描述,不重要 - website = 'http://www.mosect.com' // 网站,最好有,不重要 -} +apply plugin: 'maven-publish' android { compileSdkVersion 28 @@ -44,5 +34,33 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' - implementation 'com.mosect:ViewUtils:1.0.5' + implementation 'com.github.Mosect:ViewUtils:1.0.8' +} + +// Because the components are created only during the afterEvaluate phase, you must +// configure your publications using the afterEvaluate() lifecycle method. +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + // Applies the component for the release build variant. + from components.release + + // You can then customize attributes of the publication as shown below. + groupId = 'com.github.mosect' + artifactId = 'DragLayout' + version = '1.0.5' + } + // Creates a Maven publication called “debug”. + debug(MavenPublication) { + // Applies the component for the debug build variant. + from components.debug + + groupId = 'com.github.mosect' + artifactId = 'DragLayout' + version = '1.0.5' + } + } + } }