README.md 1.81 KB
Newer Older
郑娜伟 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
图片框架模块

支持glide、picasso、universal-image-loader图片框架


##集成方法
 
```  

 依赖方式
api 'com.sobot.library:模块名字:版本号'

例如

//support版
api 'com.sobot.library:picture:1.1'

//androidx版
api 'com.sobot.library:picture_x:1.1'

 
```  


##版本说明
###1.1
1、正式使用版本  

###1.0
首次发布


##使用方法 
 
```  

// 显示图片
SobotBitmapUtil.display();
// 指定一个你自己的SobotImageLoader,优先使用您自己的图片库
SobotBitmapUtil.setImageLoader

```


## 模块发布方法 

* 提交代码  
* 打包aar 
* 推送到maven  
* 发布  

```
//修改版本号
sobot_pictureframe --> sobot-picture-publish-mavencentral.gradle --> 修改PUBLISH_VERSION对应的值

//打包生成aar
Gradle窗口 --> sobot_pictureframe --> Tasks --> build --> assemble

//发布
Gradle窗口 --> sobot_pictureframe --> Tasks --> build --> publishing --> 点击 publishReleasePublicationToPictureRepository 推送
推送成功后登录https://s01.oss.sonatype.org 发布

```


##发布注意事项  

1、基础模块有两个版本需要发布,support和androidX ,发布时注释不需要,然后推送 

```
     //support
    api 'com.sobot.library:picture:xxx'

     //androidX
    api 'com.sobot.library:picture_x:xx'

```
2、如果三个框架(glide、picasso、universal-image-loader)都引用,优先级顺序是glide <-- picasso <-- universal-image-loader,glide 优先级最高

3、 在使用4.9.0(包含4.9.0)以上版本的glide时,需额外添加依赖,之前的版本不需要

```
83
        implementation 'com.sobot.chat:sobotsupport-glidev4:3.1'
郑娜伟 committed
84 85 86 87
```
4、picasso不支持显示本地图片

5、如果您先使用自己的图片库,可以设置SobotBitmapUtil.setImageLoader(自定义一个SobotImageLoader),会优先使用您自己的图片库