Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.JJS-CN:JBase:1.3.0'
}
dependencies {
implementation("com.github.JJS-CN:JBase:1.3.0")
}
<dependency>
<groupId>com.github.JJS-CN</groupId>
<artifactId>JBase</artifactId>
<version>1.3.0</version>
</dependency>
libraryDependencies += "com.github.JJS-CN" % "JBase" % "1.3.0"
:dependencies [[com.github.JJS-CN/JBase "1.3.0"]]
<br> 1、项目层的gradle需要添加这2个库的支持 <br> maven { url "https://jitpack.io" } <br> maven { url 'https://maven.google.com' } <br> <br> 2、每个modle需要添加butterkinfe和ARouter支持 <br> annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' <br> annotationProcessor 'com.alibaba:arouter-compiler:1.1.4' <br> <br> 3、在每个modle中build.gradle文件android->defaultConfig层级下,增加ARouter支持 <br> javaCompileOptions { <br> annotationProcessorOptions { <br> arguments = [ moduleName : project.getName() ] <br> } <br> } <br> <br> <br>2017.09.14 1:更新ALog的设置log开关方法、2:demo转移至外部、3:更新第三方版本号、4:JJsActivity中删除CreatView方法,修改butterkinfe等使用、5:增加手势图片控制PinchImageView <br>2017.09.22 1:增加爆炸view 2:更新请求方法 <br>2017.09.29 1:解决activity切换黑屏bug(切换动画设置未2个参数都设置)、2:增加activity背景设置方法(setContentView方法中自动设置,可在之前通过init或update更新)、3:新增Rsa加密工具类(已做分段加密处理)4:新增验证码图片工具类CodeImgUtils <br>2017.12.25 1:优化RetrofitUtils类,简化代码。提供拦截器替换方法 <br>2018.01.02 1:更新依赖库的版本,修改baseApplication初始化方法 <br>2018.01.03 1:修复fragment的bug,优化抽象方法 <br>2018.01.24 1:修复ReadMoreTextView在OnCreat之外绑定数据时自动展开的问题,更换显示文本导致错误用catch来规避bug了,后期有时间再完善
# 使用方法 <br> 1、请将application继承于BaseApplication,调用applyDebug(String baseUrl); 或 applyRelease(String baseUrl);初始化。或者从中抽取实例化代码也可以。 <br> 2、BaseLauncherActivity,BaseObserver,BaseStore,BaseActivity 请继承之后使用,其他随意 <br> 3、openCrash(boolean hasCrash); 可控制不创建全局crash捕获