Skip to content

Commit

Permalink
看大图界面支持自定义扩展
Browse files Browse the repository at this point in the history
  • Loading branch information
jenly1314 committed Sep 10, 2022
1 parent d02229d commit 9721523
Show file tree
Hide file tree
Showing 13 changed files with 216 additions and 124 deletions.
30 changes: 8 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
version: 2
version: 2.1

orbs:
android: circleci/android@0.2.0

jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-29
environment:
JVM_OPTS: -Xmx3200m
executor: android/android

steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Run Tests
command: ./gradlew lint test
- store_artifacts:
path: app/build/reports
destination: reports
- store_test_results:
path: app/build/test-results
command: ./gradlew build
70 changes: 40 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
![Image](app/src/main/ic_launcher-web.png)

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

## 引入

### Maven:
```maven
<dependency>
<groupId>com.king.image</groupId>
<artifactId>imageviewer</artifactId>
<version>1.0.2</version>
<type>pom</type>
</dependency>
```
### Gradle:

1. 在Project的 **build.gradle** 里面添加远程仓库

```gradle
implementation 'com.king.image:imageviewer:1.0.2'
allprojects {
repositories {
//...
mavenCentral()
}
}
```

2. 在Module的 **build.gradle** 里面添加引入依赖项

```gradle
implementation 'com.github.jenly1314:imageviewer:1.0.3'
```

### Lvy:
```lvy
<dependency org='com.king.image' name='imageviewer' rev='1.0.2'>
<artifact name='$AID' ext='pom'></artifact>
</dependency>

以前发布至JCenter的版本

```gradle
implementation 'com.king.image:imageviewer:1.0.2'
```


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

## 版本记录

#### v1.0.3:2022-9-10 (从v1.0.3开始发布至 MavenCentral)
* 看大图界面支持自定义扩展

#### v1.0.2:2020-12-3
* 加载的图片数据新增支持ImageDataSource类型,便于扩展

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

## 关于我
Name: <a title="关于作者" href="https://about.me/jenly1314" target="_blank">Jenly</a>
Name: <a title="关于作者" href="https://about.me/jenly1314" target="_blank">Jenly</a>

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>

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>
CSDN: <a title="CSDN博客" href="http://blog.csdn.net/jenly121" target="_blank">jenly121</a>

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

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

GitHub: <a title="GitHub开源项目" href="https://github.com/jenly1314" target="_blank">jenly1314</a>

Gitee: <a title="Gitee开源项目" href="https://gitee.com/jenly1314" target="_blank">jenly1314</a>
Gitee: <a title="Gitee开源项目" href="https://gitee.com/jenly1314" target="_blank">jenly1314</a>

加入QQ群: <a title="点击加入QQ群" href="http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1411582c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad" target="_blank">20867961</a>
加入QQ群: <a title="点击加入QQ群" href="http://shang.qq.com/wpa/qunwpa?idkey=8fcc6a2f88552ea44b1411582c94fd124f7bb3ec227e2a400dbbfaad3dc2f5ad" target="_blank">20867961</a>
<div>
<img src="https://jenly1314.github.io/image/jenly666.png">
<img src="https://jenly1314.github.io/image/qqgourp.png">
</div>
</div>
Binary file modified app/release/app-release.apk
Binary file not shown.
18 changes: 18 additions & 0 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": 2,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.king.imageviewer.app",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"versionCode": 4,
"versionName": "1.0.3",
"outputFile": "app-release.apk"
}
]
}
1 change: 0 additions & 1 deletion app/release/output.json

This file was deleted.

17 changes: 12 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,32 @@ buildscript {
apply from: 'versions.gradle'
repositories {
google()
jcenter()
mavenCentral()

}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'

classpath 'com.novoda:bintray-release:0.9.1'
classpath "com.android.tools.build:gradle:$versions.gradle"
classpath "com.vanniktech:gradle-maven-publish-plugin:$versions.mavenPublish"
}
}

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

}
}

allprojects {
plugins.withId("com.vanniktech.maven.publish") {
mavenPublish {
sonatypeHost = "S01"
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
Expand Down
26 changes: 26 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,29 @@ android.useAndroidX = true
android.enableJetifier = true
android.debug.obsoleteApi=true

GROUP=com.github.jenly1314
VERSION_NAME=1.0.3
VERSION_CODE=4

POM_DESCRIPTION=ImageViewer for Android
POM_INCEPTION_YEAR=2020
POM_URL=https://github.com/jenly1314/ImageViewer

POM_SCM_URL=https://github.com/jenly1314/ImageViewer
POM_SCM_CONNECTION=scm:git@github.com:jenly1314/ImageViewer.git
POM_SCM_DEV_CONNECTION=scm:git@github.com:jenly1314/ImageViewer.git

POM_LICENCE_NAME=The MIT License
POM_LICENCE_URL=https://opensource.org/licenses/mit-license.php
#POM_LICENCE_NAME=The Apache Software License, Version 2.0
#POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENSE_DIST=repo

POM_DEVELOPER_ID=jenly
POM_DEVELOPER_NAME=Jenly Yu
POM_DEVELOPER_URL=https://github.com/jenly1314/

#RELEASE_REPOSITORY_URL=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
#SNAPSHOT_REPOSITORY_URL=https://s01.oss.sonatype.org/content/repositories/snapshots/
RELEASE_SIGNING_ENABLED=false

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase = GRADLE_USER_HOME
distributionPath = wrapper/dists
zipStoreBase = GRADLE_USER_HOME
zipStorePath = wrapper/dists
distributionUrl = https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl = https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
3 changes: 2 additions & 1 deletion imageviewer/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply plugin: 'com.android.library'
apply from: 'bintray.gradle'
apply plugin: 'com.vanniktech.maven.publish'
//apply from: 'bintray.gradle'

android {
compileSdkVersion build_versions.compileSdk
Expand Down
3 changes: 3 additions & 0 deletions imageviewer/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_NAME=ImageViewer
POM_ARTIFACT_ID=imageviewer
POM_PACKAGING=aar
Loading

0 comments on commit 9721523

Please sign in to comment.