Skip to content

Commit

Permalink
Add EncodeUtils class.
Browse files Browse the repository at this point in the history
  • Loading branch information
xbdcc committed Dec 8, 2019
1 parent 780b88b commit 889d8ce
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 40 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* `19/12/08` Add EncodeUtils class.
* `19/12/06` Add CBaseEditActivity class.
* `19/11/11` Update to Android Studio 3.5.2.
* `19/10/29` Add CUncaughtExceptionHandler class.
Expand Down
39 changes: 0 additions & 39 deletions cutils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ android {
}
}

repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
jcenter()
google()
}

}

dependencies {
Expand All @@ -43,36 +37,3 @@ dependencies {

implementation 'org.aspectj:aspectjrt:1.9.2'
}

//apply plugin: 'maven'
//uploadArchives{
// repositories.mavenDeployer{
// // 本地仓库路径
// repository(url: "http://192.168.82.41:8081/repository/maven-snapshots/") {
//// repository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
// authentication(userName: "xbdcc", password: "30104991GNAHCOAC") // maven授权信息
// }
// // 唯一标识
// pom.groupId = "cn.carlos.cutils"
// // 项目名称
// pom.artifactId = "Cutils"
// // 版本号
// pom.version = "0.0.21"
// }
//}
//apply plugin: 'maven'
//uploadArchives{
// repositories.mavenDeployer{
// // 本地仓库路径
// repository(url: "http://192.168.82.41:8081/repository/maven-releases/") {
//// repository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
// authentication(userName: "caochang", password: "xbd") // maven授权信息
// }
// // 唯一标识
// pom.groupId = "cn.carlos.cutils"
// // 项目名称
// pom.artifactId = "Cutils"
// // 版本号
// pom.version = "0.0.5"
// }
//}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ open class CUncaughtExceptionHandler : Thread.UncaughtExceptionHandler {

override fun uncaughtException(t: Thread?, e: Throwable?) {
if (t == null || e == null) return
LogUtils.d("find uncaught execption:", e)
LogUtils.e("find uncaught execption:", e)
quitApp()
}

Expand Down
13 changes: 13 additions & 0 deletions cutils/src/main/java/com/carlos/cutils/util/EncodeUtils.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.carlos.cutils.util

import android.net.Uri

/**
* Created by Carlos on 2019-12-08.
*/
object EncodeUtils {

fun encodeChineseUrl(url: String): String {
return Uri.encode(url, "-![.:/,%?&=]")
}
}

0 comments on commit 889d8ce

Please sign in to comment.