Skip to content

Commit

Permalink
迁移发布至MavenCentral
Browse files Browse the repository at this point in the history
  • Loading branch information
jenly1314 committed Jan 9, 2023
1 parent f50d0f3 commit 963ed49
Show file tree
Hide file tree
Showing 21 changed files with 845 additions and 771 deletions.
65 changes: 27 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/SplitEditText/master/app/release/app-release.apk)
[![JCenter](https://img.shields.io/badge/JCenter-1.0.0-46C018.svg)](https://bintray.com/beta/#/jenly/maven/splitedittext)
[![MavenCentral](https://img.shields.io/maven-central/v/com.github.jenly1314/splitedittext)](https://repo1.maven.org/maven2/com/github/jenly1314/splitedittext)
[![JitPack](https://jitpack.io/v/jenly1314/SplitEditText.svg)](https://jitpack.io/#jenly1314/SplitEditText)
[![CI](https://travis-ci.org/jenly1314/SplitEditText.svg?branch=master)](https://travis-ci.org/jenly1314/SplitEditText)
[![CircleCI](https://circleci.com/gh/jenly1314/SplitEditText.svg?style=svg)](https://circleci.com/gh/jenly1314/SplitEditText)
Expand All @@ -12,8 +13,6 @@

SplitEditText for Android 是一个灵活的分割编辑框。常常应用于 **验证码输入****密码输入** 、等场景。

> 之所以造这个轮子,是因为之前有这样的需求,然后也用过其它类似开源的库([VerificationCodeView](https://github.com/JackTuoTuo/VerificationCodeView)),但是需求随着需求的变动,之前使用的库就不太满足现有的需求。所以最近抽空写了一个。
## 特性说明
- [x] 支持设置框数量
- [x] 支持设置框的风格样式
Expand Down Expand Up @@ -42,37 +41,24 @@ SplitEditText for Android 是一个灵活的分割编辑框。常常应用于 **

## 引入

### Maven:
```maven
<dependency>
<groupId>com.king.view</groupId>
<artifactId>splitedittext</artifactId>
<version>1.0.0</version>
<type>pom</type>
</dependency>
```
### Gradle:
```gradle
//AndroidX
implementation 'com.king.view:splitedittext:1.0.0'
```
1. 在Project的 **build.gradle** 里面添加远程仓库

### Lvy:
```lvy
<dependency org='com.king.view' name='splitedittext' rev='1.0.0'>
<artifact name='$AID' ext='pom'></artifact>
</dependency>
```

###### 如果Gradle出现compile失败的情况,可以在Project的build.gradle里面添加如下:(也可以使用上面的GitPack来complie)
```gradle
allprojects {
repositories {
maven { url 'https://dl.bintray.com/jenly/maven' }
//...
mavenCentral()
}
}
```

2. 在Module的 **build.gradle** 里面添加引入依赖项
```gradle
// AndroidX 版本
implementation 'com.github.jenly1314:splitedittext:1.1.0'
```

## 示例

布局示例
Expand Down Expand Up @@ -125,38 +111,41 @@ Java

## 相关推荐

[CodeTextField](https://github.com/jenly1314/CodeTextField) 一个使用 Compose 实现的验证码输入框

[KingKeyboard](https://github.com/jenly1314/KingKeyboard) 自定义键盘,满足各种不同场景的键盘输入需求

## 版本记录

#### v1.1.0:2023-1-9 (开始发布至MavenCentral)
* 迁移发布至MavenCentral

#### v1.0.0:2021-1-5
* SplitEditText初始版本

## 赞赏
如果您喜欢SplitEditText,或感觉SplitEditText帮助到了您,可以点右上角“Star”支持一下,您的支持就是我的动力,谢谢 :smiley:<p>
您也可以扫描下面的二维码,请作者喝杯咖啡 :coffee:
<div>
<img src="https://jenly1314.github.io/image/pay/wxpay.png" width="280" heght="350">
<img src="https://jenly1314.github.io/image/pay/alipay.png" width="280" heght="350">
<img src="https://jenly1314.github.io/image/pay/qqpay.png" width="280" heght="350">
<img src="https://jenly1314.github.io/image/alipay_red_envelopes.jpg" width="233" heght="350">
</div>
<div>
<img src="https://jenly1314.github.io/image/pay/sponsor.png" width="98%">
</div>

## 关于我
Name: <a title="关于作者" href="https://about.me/jenly1314" target="_blank">Jenly</a>
Name: <a title="关于作者" href="https://jenly1314.github.io" target="_blank">Jenly</a>

Email: <a title="欢迎邮件与我交流" href="mailto:[email protected]" target="_blank">jenly1314#gmail.com</a> / <a title="给我发邮件" href="mailto:[email protected]" target="_blank">jenly1314#vip.qq.com</a>
Email: <a title="欢迎邮件与我交流" href="mailto:[email protected]" target="_blank">jenly1314#gmail.com</a> / <a title="给我发邮件" href="mailto:[email protected]" target="_blank">jenly1314#vip.qq.com</a>

CSDN: <a title="CSDN博客" href="http://blog.csdn.net/jenly121" target="_blank">jenly121</a>
CSDN: <a title="CSDN博客" href="http://blog.csdn.net/jenly121" target="_blank">jenly121</a>

CNBlogs: <a title="博客园" href="https://www.cnblogs.com/jenly" target="_blank">jenly</a>
CNBlogs: <a title="博客园" href="https://www.cnblogs.com/jenly" target="_blank">jenly</a>

GitHub: <a title="GitHub开源项目" href="https://github.com/jenly1314" target="_blank">jenly1314</a>
GitHub: <a title="GitHub开源项目" href="https://github.com/jenly1314" target="_blank">jenly1314</a>

Gitee: <a title="Gitee开源项目" href="https://gitee.com/jenly1314" target="_blank">jenly1314</a>
Gitee: <a title="Gitee开源项目" href="https://gitee.com/jenly1314" target="_blank">jenly1314</a>

加入QQ群: <a title="点击加入QQ群" href="http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1411582c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad" target="_blank">20867961</a>
加入QQ群: <a title="点击加入QQ群" href="http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1411582c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad" target="_blank">20867961</a>
<div>
<img src="https://jenly1314.github.io/image/jenly666.png">
<img src="https://jenly1314.github.io/image/qqgourp.png">
</div>

2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies {
testImplementation "junit:junit:$versions.junit"
androidTestImplementation "androidx.test.ext:junit:$versions.androidExtJunit"
androidTestImplementation "androidx.test.espresso:espresso-core:$versions.espressoCore"
implementation project(':splitedittext')

implementation project(':split-edit-text')

}
Binary file modified app/release/app-release.apk
Binary file not shown.
18 changes: 18 additions & 0 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": 2,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.king.view.splitedittext.app",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"versionCode": 2,
"versionName": "1.1.0",
"outputFile": "app-release.apk"
}
]
}
1 change: 0 additions & 1 deletion app/release/output.json

This file was deleted.

15 changes: 11 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,30 @@ buildscript {
apply from: 'versions.gradle'
repositories {
google()
jcenter()
mavenCentral()

}
dependencies {
classpath "com.android.tools.build:gradle:$versions.gradle"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$versions.dokka"

classpath "com.github.panpf.bintray-publish:bintray-publish:$versions.bintrayRelease"
// classpath "com.github.panpf.bintray-publish:bintray-publish:$versions.bintrayRelease"
classpath "com.vanniktech:gradle-maven-publish-plugin:$versions.mavenPublish"
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

allprojects {
plugins.withId("com.vanniktech.maven.publish") {
mavenPublish {
sonatypeHost = "S01"
}
}
}

Expand Down
27 changes: 26 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,29 @@ android.useAndroidX = true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier = true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style = official
kotlin.code.style = official

VERSION_NAME=1.1.0
VERSION_CODE=2
GROUP=com.github.jenly1314

POM_DESCRIPTION=SplitEditText for Android
POM_URL=https://github.com/jenly1314/SplitEditText

POM_SCM_URL=https://github.com/jenly1314/SplitEditText
POM_SCM_CONNECTION=scm:[email protected]:jenly1314/SplitEditText.git
POM_SCM_DEV_CONNECTION=scm:[email protected]:jenly1314/SplitEditText.git

POM_LICENCE_NAME=The MIT License
POM_LICENCE_URL=https://opensource.org/licenses/mit-license.php
#POM_LICENCE_NAME=The Apache Software License, Version 2.0
#POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt

POM_DEVELOPER_ID=jenly
POM_DEVELOPER_NAME=Jenly Yu
POM_DEVELOPER_URL=https://github.com/jenly1314/

RELEASE_REPOSITORY_URL=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
SNAPSHOT_REPOSITORY_URL=https://s01.oss.sonatype.org/content/repositories/snapshots/

RELEASE_SIGNING_ENABLED=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include ':split-edit-text'
include ':splitedittext'
include ':app'
rootProject.name = "SplitEditText"
File renamed without changes.
24 changes: 12 additions & 12 deletions split-edit-text/bintray.gradle → splitedittext/bintray.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//apply plugin: 'com.novoda.bintray-release'
apply plugin: 'com.github.panpf.bintray-publish'

//添加
publish {
userOrg = 'jenly'//bintray.com用户名
groupId = 'com.king.view'//jcenter上的路径
artifactId = 'splitedittext'//项目名称
publishVersion = app_version.versionName//版本号
desc = 'SplitEditText for Android'//描述
website = 'https://github.com/jenly1314/SplitEditText'//网站
licences = ['MIT']//开源协议
//apply plugin: 'com.novoda.bintray-release'
apply plugin: 'com.github.panpf.bintray-publish'

//添加
publish {
userOrg = 'jenly'//bintray.com用户名
groupId = 'com.king.view'//jcenter上的路径
artifactId = 'splitedittext'//项目名称
publishVersion = app_version.versionName//版本号
desc = 'SplitEditText for Android'//描述
website = 'https://github.com/jenly1314/SplitEditText'//网站
licences = ['MIT']//开源协议
}
86 changes: 43 additions & 43 deletions split-edit-text/build.gradle → splitedittext/build.gradle
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
apply plugin: 'com.android.library'
apply from: 'bintray.gradle'


android {
compileSdkVersion build_versions.compileSdk
buildToolsVersion build_versions.buildTools

defaultConfig {
minSdkVersion build_versions.minSdk
targetSdkVersion build_versions.targetSdk
versionCode app_version.versionCode
versionName app_version.versionName

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

lintOptions {
abortOnError false
warning 'InvalidPackage'
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

testImplementation "junit:junit:$versions.junit"
androidTestImplementation "androidx.test.ext:junit:$versions.androidExtJunit"
androidTestImplementation "androidx.test.espresso:espresso-core:$versions.espressoCore"

compileOnly "androidx.appcompat:appcompat:$versions.appcompat"

}

apply plugin: 'com.android.library'
//apply from: 'bintray.gradle'
apply plugin: "com.vanniktech.maven.publish"

android {
compileSdkVersion build_versions.compileSdk
buildToolsVersion build_versions.buildTools

defaultConfig {
minSdkVersion build_versions.minSdk
targetSdkVersion build_versions.targetSdk
versionCode app_version.versionCode
versionName app_version.versionName

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

lintOptions {
abortOnError false
warning 'InvalidPackage'
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

testImplementation "junit:junit:$versions.junit"
androidTestImplementation "androidx.test.ext:junit:$versions.androidExtJunit"
androidTestImplementation "androidx.test.espresso:espresso-core:$versions.espressoCore"

compileOnly "androidx.appcompat:appcompat:$versions.appcompat"

}

File renamed without changes.
3 changes: 3 additions & 0 deletions splitedittext/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_NAME=SplitEditText
POM_ARTIFACT_ID=splitedittext
POM_PACKAGING=aar
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Loading

0 comments on commit 963ed49

Please sign in to comment.