Skip to content

Commit 9721523

Browse files
committed
看大图界面支持自定义扩展
1 parent d02229d commit 9721523

13 files changed

Lines changed: 216 additions & 124 deletions

File tree

.circleci/config.yml

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
1-
version: 2
1+
version: 2.1
2+
3+
orbs:
4+
android: circleci/android@0.2.0
5+
26
jobs:
37
build:
4-
working_directory: ~/code
5-
docker:
6-
- image: circleci/android:api-29
7-
environment:
8-
JVM_OPTS: -Xmx3200m
8+
executor: android/android
9+
910
steps:
1011
- checkout
11-
- restore_cache:
12-
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
1312
- run:
14-
name: Download Dependencies
15-
command: ./gradlew androidDependencies
16-
- save_cache:
17-
paths:
18-
- ~/.gradle
19-
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
20-
- run:
21-
name: Run Tests
22-
command: ./gradlew lint test
23-
- store_artifacts:
24-
path: app/build/reports
25-
destination: reports
26-
- store_test_results:
27-
path: app/build/test-results
13+
command: ./gradlew build

README.md

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
![Image](app/src/main/ic_launcher-web.png)
44

55
[![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/ImageViewer/master/app/release/app-release.apk)
6+
[![MavenCentral](https://img.shields.io/maven-central/v/com.github.jenly1314/imageviewer)](https://repo1.maven.org/maven2/com/github/jenly1314/imageviewer)
67
[![JCenter](https://img.shields.io/badge/JCenter-1.0.2-46C018.svg)](https://bintray.com/beta/#/jenly/maven/imageviewer)
78
[![JitPack](https://jitpack.io/v/jenly1314/ImageViewer.svg)](https://jitpack.io/#jenly1314/ImageViewer)
89
[![CI](https://travis-ci.org/jenly1314/ImageViewer.svg?branch=master)](https://travis-ci.org/jenly1314/ImageViewer)
@@ -20,27 +21,33 @@ ImageViewer for Android 是一个图片查看器,一般用来查看图片详
2021

2122
## 引入
2223

23-
### Maven:
24-
```maven
25-
<dependency>
26-
<groupId>com.king.image</groupId>
27-
<artifactId>imageviewer</artifactId>
28-
<version>1.0.2</version>
29-
<type>pom</type>
30-
</dependency>
31-
```
3224
### Gradle:
25+
26+
1. 在Project的 **build.gradle** 里面添加远程仓库
27+
3328
```gradle
34-
implementation 'com.king.image:imageviewer:1.0.2'
29+
allprojects {
30+
repositories {
31+
//...
32+
mavenCentral()
33+
}
34+
}
35+
```
36+
37+
2. 在Module的 **build.gradle** 里面添加引入依赖项
38+
39+
```gradle
40+
implementation 'com.github.jenly1314:imageviewer:1.0.3'
3541
```
3642

37-
### Lvy:
38-
```lvy
39-
<dependency org='com.king.image' name='imageviewer' rev='1.0.2'>
40-
<artifact name='$AID' ext='pom'></artifact>
41-
</dependency>
43+
44+
以前发布至JCenter的版本
45+
46+
```gradle
47+
implementation 'com.king.image:imageviewer:1.0.2'
4248
```
4349

50+
4451
###### 如果Gradle出现compile失败的情况,可以在Project的build.gradle里面添加如下:(也可以使用上面的GitPack来complie)
4552
```gradle
4653
allprojects {
@@ -96,6 +103,9 @@ allprojects {
96103

97104
## 版本记录
98105

106+
#### v1.0.3:2022-9-10 (从v1.0.3开始发布至 MavenCentral)
107+
* 看大图界面支持自定义扩展
108+
99109
#### v1.0.2:2020-12-3
100110
* 加载的图片数据新增支持ImageDataSource类型,便于扩展
101111

@@ -108,28 +118,28 @@ allprojects {
108118
## 赞赏
109119
如果您喜欢ImageViewer,或感觉ImageViewer帮助到了您,可以点右上角“Star”支持一下,您的支持就是我的动力,谢谢 :smiley:<p>
110120
您也可以扫描下面的二维码,请作者喝杯咖啡 :coffee:
111-
<div>
112-
<img src="https://jenly1314.github.io/image/pay/wxpay.png" width="280" heght="350">
113-
<img src="https://jenly1314.github.io/image/pay/alipay.png" width="280" heght="350">
114-
<img src="https://jenly1314.github.io/image/pay/qqpay.png" width="280" heght="350">
115-
<img src="https://jenly1314.github.io/image/alipay_red_envelopes.jpg" width="233" heght="350">
116-
</div>
121+
<div>
122+
<img src="https://jenly1314.github.io/image/pay/wxpay.png" width="280" heght="350">
123+
<img src="https://jenly1314.github.io/image/pay/alipay.png" width="280" heght="350">
124+
<img src="https://jenly1314.github.io/image/pay/qqpay.png" width="280" heght="350">
125+
<img src="https://jenly1314.github.io/image/alipay_red_envelopes.jpg" width="233" heght="350">
126+
</div>
117127

118128
## 关于我
119-
Name: <a title="关于作者" href="https://about.me/jenly1314" target="_blank">Jenly</a>
129+
Name: <a title="关于作者" href="https://about.me/jenly1314" target="_blank">Jenly</a>
130+
131+
Email: <a title="欢迎邮件与我交流" href="mailto:jenly1314@gmail.com" target="_blank">jenly1314#gmail.com</a> / <a title="给我发邮件" href="mailto:jenly1314@vip.qq.com" target="_blank">jenly1314#vip.qq.com</a>
120132

121-
Email: <a title="欢迎邮件与我交流" href="mailto:jenly1314@gmail.com" target="_blank">jenly1314#gmail.com</a> / <a title="给我发邮件" href="mailto:jenly1314@vip.qq.com" target="_blank">jenly1314#vip.qq.com</a>
133+
CSDN: <a title="CSDN博客" href="http://blog.csdn.net/jenly121" target="_blank">jenly121</a>
122134

123-
CSDN: <a title="CSDN博客" href="http://blog.csdn.net/jenly121" target="_blank">jenly121</a>
135+
CNBlogs: <a title="博客园" href="https://www.cnblogs.com/jenly" target="_blank">jenly</a>
124136

125-
CNBlog: <a title="博客园" href="https://www.cnblogs.com/jenly" target="_blank">jenly</a>
137+
GitHub: <a title="GitHub开源项目" href="https://github.com/jenly1314" target="_blank">jenly1314</a>
126138

127-
GitHub: <a title="GitHub开源项目" href="https://github.com/jenly1314" target="_blank">jenly1314</a>
128-
129-
Gitee: <a title="Gitee开源项目" href="https://gitee.com/jenly1314" target="_blank">jenly1314</a>
139+
Gitee: <a title="Gitee开源项目" href="https://gitee.com/jenly1314" target="_blank">jenly1314</a>
130140

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

app/release/app-release.apk

-42.8 KB
Binary file not shown.

app/release/output-metadata.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": 2,
3+
"artifactType": {
4+
"type": "APK",
5+
"kind": "Directory"
6+
},
7+
"applicationId": "com.king.imageviewer.app",
8+
"variantName": "release",
9+
"elements": [
10+
{
11+
"type": "SINGLE",
12+
"filters": [],
13+
"versionCode": 4,
14+
"versionName": "1.0.3",
15+
"outputFile": "app-release.apk"
16+
}
17+
]
18+
}

app/release/output.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

build.gradle

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,32 @@ buildscript {
44
apply from: 'versions.gradle'
55
repositories {
66
google()
7-
jcenter()
7+
mavenCentral()
88

99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.5.1'
12-
13-
classpath 'com.novoda:bintray-release:0.9.1'
11+
classpath "com.android.tools.build:gradle:$versions.gradle"
12+
classpath "com.vanniktech:gradle-maven-publish-plugin:$versions.mavenPublish"
1413
}
1514
}
1615

1716
allprojects {
1817
repositories {
1918
google()
20-
jcenter()
19+
mavenCentral()
2120
maven { url 'https://jitpack.io' }
2221

2322
}
2423
}
2524

25+
allprojects {
26+
plugins.withId("com.vanniktech.maven.publish") {
27+
mavenPublish {
28+
sonatypeHost = "S01"
29+
}
30+
}
31+
}
32+
2633
task clean(type: Delete) {
2734
delete rootProject.buildDir
2835
}

gradle.properties

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,29 @@ android.useAndroidX = true
1919
android.enableJetifier = true
2020
android.debug.obsoleteApi=true
2121

22+
GROUP=com.github.jenly1314
23+
VERSION_NAME=1.0.3
24+
VERSION_CODE=4
25+
26+
POM_DESCRIPTION=ImageViewer for Android
27+
POM_INCEPTION_YEAR=2020
28+
POM_URL=https://github.com/jenly1314/ImageViewer
29+
30+
POM_SCM_URL=https://github.com/jenly1314/ImageViewer
31+
POM_SCM_CONNECTION=scm:git@github.com:jenly1314/ImageViewer.git
32+
POM_SCM_DEV_CONNECTION=scm:git@github.com:jenly1314/ImageViewer.git
33+
34+
POM_LICENCE_NAME=The MIT License
35+
POM_LICENCE_URL=https://opensource.org/licenses/mit-license.php
36+
#POM_LICENCE_NAME=The Apache Software License, Version 2.0
37+
#POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
38+
POM_LICENSE_DIST=repo
39+
40+
POM_DEVELOPER_ID=jenly
41+
POM_DEVELOPER_NAME=Jenly Yu
42+
POM_DEVELOPER_URL=https://github.com/jenly1314/
43+
44+
#RELEASE_REPOSITORY_URL=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
45+
#SNAPSHOT_REPOSITORY_URL=https://s01.oss.sonatype.org/content/repositories/snapshots/
46+
RELEASE_SIGNING_ENABLED=false
47+

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase = GRADLE_USER_HOME
33
distributionPath = wrapper/dists
44
zipStoreBase = GRADLE_USER_HOME
55
zipStorePath = wrapper/dists
6-
distributionUrl = https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
distributionUrl = https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip

imageviewer/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: 'com.android.library'
2-
apply from: 'bintray.gradle'
2+
apply plugin: 'com.vanniktech.maven.publish'
3+
//apply from: 'bintray.gradle'
34

45
android {
56
compileSdkVersion build_versions.compileSdk

imageviewer/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
POM_NAME=ImageViewer
2+
POM_ARTIFACT_ID=imageviewer
3+
POM_PACKAGING=aar

0 commit comments

Comments
 (0)