diff --git a/app/build.gradle b/app/build.gradle index 02d5cb1..7f330c5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -41,7 +41,7 @@ android { dependencies { - implementation project(path: ':downloader') + //implementation project(path: ':downloader') implementation project(path: ':downloader-m3u8') implementation project(path: ':fileOperation') api fileTree(include: ['*.jar'], dir: 'libs') @@ -59,6 +59,7 @@ dependencies { //compile project(':memory') api project(':imagelist') api project(':imagelist') + api project(':compressor') //compile project(':picasso') api project(':glidev4') @@ -87,7 +88,7 @@ dependencies { api 'org.raphets:roundimageview:1.2.0' api('com.github.skyNet2017.Luban:dataForPhotoSelet:3.3.0') - api project(path: ':webviewspider') + //api project(path: ':webviewspider') // api project(path: ':spiders') api 'com.github.getActivity:XXPermissions:11.6'//请求存储权限 debugImplementation 'com.glance.guolindev:glance:1.0.0' @@ -100,6 +101,8 @@ dependencies { resolutionStrategy.force 'com.squareup.okio:okio:1.15.0' resolutionStrategy.force 'com.github.bumptech.glide:glide:4.11.0' } + api "com.github.hss01248.utilcodeEnhance:downloader:${utilcodeVersion}" + api "com.github.hss01248.utilcodeEnhance:webviewspider:${utilcodeVersion}" api "com.github.hss01248.utilcodeEnhance:bitmap-saver:${utilcodeVersion}" api "com.github.hss01248.utilcodeEnhance:viewholder-media:${utilcodeVersion}" api('com.davemorrissey.labs:subsampling-scale-image-view:3.10.0') { diff --git a/bigimgdemo/build.gradle b/bigimgdemo/build.gradle index 97eab7c..4e46f83 100644 --- a/bigimgdemo/build.gradle +++ b/bigimgdemo/build.gradle @@ -38,7 +38,7 @@ dependencies { implementation 'androidx.constraintlayout:constraintlayout:2.1.0' implementation project(path: ':bigimageviewpager') implementation project(path: ':imagelist') - implementation project(path: ':webviewspider') + api "com.github.hss01248.utilcodeEnhance:webviewspider:${utilcodeVersion}" testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' diff --git a/build.gradle b/build.gradle index d0897ff..c3a3d05 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ buildscript { snapshotUrl='https://nexus.hss01248.tech/repository/maven-snapshots/' publicUrl='https://nexus.hss01248.tech/#browse/browse:maven-public:' - utilcodeVersion='1.6.4' + utilcodeVersion='1.6.5' } diff --git a/downloader-m3u8/build.gradle b/downloader-m3u8/build.gradle index c800364..5e773dc 100644 --- a/downloader-m3u8/build.gradle +++ b/downloader-m3u8/build.gradle @@ -32,7 +32,7 @@ dependencies { testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' - api project(path: ':downloader') + api "com.github.hss01248.utilcodeEnhance:downloader:${utilcodeVersion}" api 'io.lindstrom:m3u8-parser:0.27' implementation 'com.liulishuo.filedownloader:library:1.7.7' } \ No newline at end of file diff --git a/downloader-m3u8/src/main/AndroidManifest.xml b/downloader-m3u8/src/main/AndroidManifest.xml index 9440aaa..2c3a323 100644 --- a/downloader-m3u8/src/main/AndroidManifest.xml +++ b/downloader-m3u8/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/imagelist/build.gradle b/imagelist/build.gradle index 984dd7e..bd97734 100644 --- a/imagelist/build.gradle +++ b/imagelist/build.gradle @@ -31,7 +31,7 @@ dependencies { //api 'com.github.hss01248.ImageLoader:glidev4:3.2.3' //api 'com.github.hss01248.ImageLoader:bigimageviewpager:3.2.3' api project(':glidev4') - api project(':downloader') + //api "com.github.hss01248.utilcodeEnhance:downloader:${utilcodeVersion}" //api project(':bigimageviewpager') implementation 'androidx.appcompat:appcompat:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.0.0' @@ -46,8 +46,9 @@ dependencies { api 'com.github.fondesa:recycler-view-divider:3.5.0' //implementation 'com.yqritc:recyclerview-flexibledivider:1.4.0' - api 'com.github.hss01248:UI:0.0.1' + //api 'com.github.hss01248:UI:0.0.1' api "com.github.hss01248.utilcodeEnhance:iwidget:${utilcodeVersion}" + api "com.github.hss01248.utilcodeEnhance:downloader:${utilcodeVersion}" api 'com.github.hss01248:DialogUtil:3.0.5' api "com.github.hss01248.utilcodeEnhance:fullScreenDialog:${utilcodeVersion}" api "com.github.hss01248.utilcodeEnhance:viewholder:${utilcodeVersion}" diff --git a/imagelist/src/main/java/com/hss01248/imagelist/GlideDownloadImpl.java b/imagelist/src/main/java/com/hss01248/imagelist/GlideDownloadImpl.java deleted file mode 100644 index 5f93b62..0000000 --- a/imagelist/src/main/java/com/hss01248/imagelist/GlideDownloadImpl.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.hss01248.imagelist; - -import androidx.annotation.NonNull; - -import com.blankj.utilcode.util.FileUtils; -import com.blankj.utilcode.util.ThreadUtils; -import com.bumptech.glide.load.engine.GlideException; -import com.hss.downloader.IDownload; -import com.hss.downloader.IDownloadCallback; -import com.hss01248.image.ImageLoader; -import com.hss01248.image.interfaces.FileGetter; - -import java.io.File; -import java.util.Map; - -import me.jessyan.progressmanager.ProgressListener; -import me.jessyan.progressmanager.ProgressManager; -import me.jessyan.progressmanager.body.ProgressInfo; - -public class GlideDownloadImpl implements IDownload { - @Override - public void download(String url, @NonNull String filePath, @NonNull Map headers, IDownloadCallback callback) { - ImageLoader.getActualLoader().download(url, new FileGetter() { - @Override - public void onSuccess(File file, int width, int height) { - ThreadUtils.executeByIo(new ThreadUtils.Task() { - @Override - public File doInBackground() throws Throwable { - File file1 = new File(filePath); - FileUtils.copy(file, file1, new FileUtils.OnReplaceListener() { - @Override - public boolean onReplace(File srcFile, File destFile) { - return true; - } - }); - return file1; - } - - @Override - public void onSuccess(File result) { - callback.onSuccess(url,filePath); - } - - @Override - public void onCancel() { - - } - - @Override - public void onFail(Throwable t) { - - } - }); - - } - - @Override - public void onFail(Throwable e) { - if(e instanceof GlideException){ - GlideException exception = (GlideException) e; - if(exception.getRootCauses() != null && exception.getRootCauses().size()>0){ - e = exception.getRootCauses().get(0); - } - } - callback.onFail(url,filePath,e.getMessage(),e); - - } - - @Override - public void onStart() { - callback.onStart(url,filePath); - } - - @Override - public void onProgress(long currentOffset, long totalLength) { - // callback.progress(url,currentOffset,totalLength); - } - }); - ProgressManager.getInstance().addResponseListener(url, new ProgressListener() { - @Override - public void onProgress(ProgressInfo progressInfo) { - try { - callback.onProgress(url,filePath,progressInfo.getCurrentbytes(),progressInfo.getContentLength(),0); - //tvProgress.setText(progressInfo.getPercent()+"% , speed: "+(progressInfo.getSpeed()/1024/8)+"KB/s"); - }catch (Throwable throwable){ - throwable.printStackTrace(); - } - } - - @Override - public void onError(long id, Exception e) { - if(e != null){ - //e.printStackTrace(); - } - } - }); - } - - @Override - public void stopDownload(String url) { - - } -} diff --git a/imagelist/src/main/java/com/hss01248/imagelist/album/ImageListView.java b/imagelist/src/main/java/com/hss01248/imagelist/album/ImageListView.java index 40c7d3f..c0425c9 100644 --- a/imagelist/src/main/java/com/hss01248/imagelist/album/ImageListView.java +++ b/imagelist/src/main/java/com/hss01248/imagelist/album/ImageListView.java @@ -41,7 +41,6 @@ import com.hss01248.img.compressor.ImageDirCompressor; import com.hss01248.img.compressor.UiForDirCompress; import com.hss01248.iwidget.singlechoose.ISingleChooseItem; -import com.hss01248.ui.pop.list.PopList; import org.apache.commons.io.FileUtils; diff --git a/settings.gradle b/settings.gradle index 732f190..9a04661 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,10 +6,10 @@ include ':MediaStoreApi' include ':avif' include ':compressor' include ':xxspiders' -include ':downloader' +//include ':downloader' include ':spiders' include ':imageDebugger' -include ':webviewspider' +//include ':webviewspider' include ':bigimgdemo' include ':bigimageviewpager'//include ':bigimage' include ':app', ':imageloader', ':glidev4', ':glidebase', ':imagelist'