Skip to content

Commit

Permalink
迁移到jitpack
Browse files Browse the repository at this point in the history
  • Loading branch information
junixapp committed May 6, 2021
1 parent 1dee0da commit a67138a
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 29 deletions.
6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ XPopupExt是XPopup的扩展功能库,由于对PickerView自身的UI和交互
```
implementation 'com.lxj:xpopup-ext:最新版本'
//由于扩展库依赖XPopup才能正常使用,所以还必须添加XPopup依赖
implementation 'com.lxj:xpopup:2.0.2'
implementation 'com.github.li-xiaojun:XPopup:2.2.25'
```

- 时间选择器TimerPickerPopup弹窗,使用示例:
Expand All @@ -22,7 +22,7 @@ date2.set(2020, 5,1);
TimePickerPopup popup = new TimePickerPopup(MainActivity.this)
// .setDefaultDate(date) //设置默认选中日期
// .setYearRange(1990, 1999) //设置年份范围
// .setDateRang(date, date2) //设置日期范围
// .setDateRange(date, date2) //设置日期范围
.setTimePickerListener(new TimePickerListener() {
@Override
public void onTimeChanged(Date date) {
Expand Down
3 changes: 1 addition & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.lxj:xpopup:2.0.2' //弹窗
implementation 'com.github.li-xiaojun:XPopup:2.2.25'
implementation project(":ext")
// implementation 'com.lxj:xpopup-ext:0.0.3'
}
5 changes: 2 additions & 3 deletions app/src/main/java/com/lxj/xpopupextdemo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import android.util.Log;
import android.view.View;
import android.widget.Toast;

import com.lxj.xpopup.XPopup;
import com.lxj.xpopupext.listener.CityPickerListener;
import com.lxj.xpopupext.listener.TimePickerListener;
Expand All @@ -32,9 +31,9 @@ public void onClick(View view) {
date2.set(2020, 5,1);
TimePickerPopup popup = new TimePickerPopup(MainActivity.this)
// .setMode(TimePickerPopup.Mode.YMDHMS)
// .setDefaultDate(date) //设置默认选中日期
.setDefaultDate(date) //设置默认选中日期
// .setYearRange(1990, 1999) //设置年份范围
// .setDateRang(date, date2) //设置日期范围
.setDateRange(date, date2) //设置日期范围
.setTimePickerListener(new TimePickerListener() {
@Override
public void onTimeChanged(Date date) {
Expand Down
9 changes: 3 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:3.5.3"
classpath 'com.novoda:bintray-release:0.9.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}

Expand Down
25 changes: 12 additions & 13 deletions ext/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'

android {
compileSdkVersion 29
Expand All @@ -23,16 +22,16 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.lxj:xpopup:2.2.12' //弹窗
// api project(':wheelview')
implementation 'com.contrarywind:wheelview:4.1.0'
}
publish {
userOrg = 'li-xiaojun'
groupId = 'com.lxj'
artifactId = 'xpopup-ext'
publishVersion = '0.0.4'
repoName = 'jrepo'
desc = 'XPopup扩展功能库'
website = 'https://github.com/li-xiaojun/XPopupExt'
implementation 'com.github.li-xiaojun:XPopup:2.2.25'
// implementation 'com.contrarywind:wheelview:4.1.0'
implementation project(":wheelview")
}
//publish {
// userOrg = 'li-xiaojun'
// groupId = 'com.lxj'
// artifactId = 'xpopup-ext'
// publishVersion = '0.0.4'
// repoName = 'jrepo'
// desc = 'XPopup扩展功能库'
// website = 'https://github.com/li-xiaojun/XPopupExt'
//}
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public TimePickerPopup setYearRange(int startYear, int endYear) {
/**
* 设置可以选择的时间范围
*/
public TimePickerPopup setDateRang(Calendar startDate, Calendar endDate) {
public TimePickerPopup setDateRange(Calendar startDate, Calendar endDate) {
this.startDate = startDate;
this.endDate = endDate;
return this;
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include ':ext'
include ':app'
//include ':wheelview'
include ':wheelview'
rootProject.name = "XPopupExt"

0 comments on commit a67138a

Please sign in to comment.