修改上传脚本,将从库从jcenter迁移到mavencentral

pull/907/head
laoyuyu 4 years ago
parent 6eab496b6a
commit ebbbbee1f8
  1. 3
      AppFrame/build.gradle
  2. 2
      AppFrame/src/main/java/com/arialyy/frame/util/AESEncryption.java
  3. 11
      Aria/build.gradle
  4. 2
      Aria/src/main/java/com/arialyy/aria/core/download/DownloadGroupTaskListener.java
  5. 4
      Aria/src/main/java/com/arialyy/aria/core/download/DownloadReceiver.java
  6. 2
      Aria/src/main/java/com/arialyy/aria/core/download/DownloadTaskListener.java
  7. 4
      Aria/src/main/java/com/arialyy/aria/core/download/target/DTargetFactory.java
  8. 4
      Aria/src/main/java/com/arialyy/aria/core/download/target/TcpBuilderTarget.java
  9. 4
      Aria/src/main/java/com/arialyy/aria/core/download/tcp/TcpDelegate.java
  10. 4
      Aria/src/main/java/com/arialyy/aria/core/download/tcp/TcpTaskConfig.java
  11. 2
      Aria/src/main/java/com/arialyy/aria/core/scheduler/TaskInternalListenerInterface.java
  12. 2
      Aria/src/main/java/com/arialyy/aria/core/upload/UploadTaskListener.java
  13. 4
      Aria/src/main/java/com/arialyy/aria/core/upload/target/UTargetFactory.java
  14. 7
      AriaAnnotations/build.gradle
  15. 6
      AriaCompiler/build.gradle
  16. 3
      DEV_LOG.md
  17. 9
      FtpComponent/build.gradle
  18. 4
      FtpComponent/src/main/java/com/arialyy/aria/ftp/BaseFtpThreadTaskAdapter.java
  19. 4
      FtpComponent/src/main/java/com/arialyy/aria/ftp/download/FtpDLoaderUtil.java
  20. 4
      FtpComponent/src/main/java/com/arialyy/aria/ftp/download/FtpDRecordHandler.java
  21. 4
      FtpComponent/src/main/java/com/arialyy/aria/ftp/download/FtpDThreadTaskAdapter.java
  22. 4
      FtpComponent/src/main/java/com/arialyy/aria/ftp/download/FtpSubDLoaderUtil.java
  23. 4
      FtpComponent/src/main/java/com/arialyy/aria/ftp/upload/FtpULoaderUtil.java
  24. 9
      HttpComponent/build.gradle
  25. 4
      HttpComponent/src/main/java/com/arialyy/aria/http/BaseHttpThreadTaskAdapter.java
  26. 4
      HttpComponent/src/main/java/com/arialyy/aria/http/ConnectionHelp.java
  27. 4
      HttpComponent/src/main/java/com/arialyy/aria/http/HttpRecordHandler.java
  28. 4
      HttpComponent/src/main/java/com/arialyy/aria/http/download/HttpDLoaderUtil.java
  29. 4
      HttpComponent/src/main/java/com/arialyy/aria/http/download/HttpSubDLoaderUtil.java
  30. 4
      HttpComponent/src/main/java/com/arialyy/aria/http/upload/HttpULoaderUtil.java
  31. 9
      M3U8Component/build.gradle
  32. 3
      M3U8Component/src/main/java/com/arialyy/aria/m3u8/IdGenerator.java
  33. 4
      M3U8Component/src/main/java/com/arialyy/aria/m3u8/vod/VodRecordHandler.java
  34. 9
      PublicComponent/build.gradle
  35. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/TaskOptionParams.java
  36. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/common/RecordHelper.java
  37. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/inf/IEventHandler.java
  38. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/inf/IOptionConstant.java
  39. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/loader/ILoaderAdapter.java
  40. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/loader/IRecordHandler.java
  41. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/processor/ProxyHandler.java
  42. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/task/AbsThreadTaskAdapter.java
  43. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/task/IThreadTask.java
  44. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/task/IThreadTaskAdapter.java
  45. 4
      PublicComponent/src/main/java/com/arialyy/aria/core/task/IThreadTaskObserver.java
  46. 4
      PublicComponent/src/main/java/com/arialyy/aria/util/ComponentUtil.java
  47. 22
      README.md
  48. 9
      SFtpComponent/build.gradle
  49. 4
      SFtpComponent/src/main/java/com/arialyy/aria/sftp/download/SFtpDRecordHandler.java
  50. 9
      app/build.gradle
  51. 2
      app/src/main/res/values/attr.xml
  52. 25
      build.gradle
  53. 3
      gradle.properties
  54. 216
      gradle/mavenCentral-release.gradle
  55. 3
      gradle/wrapper/gradle-wrapper.properties

@ -15,6 +15,9 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
debug{
debuggable true
}
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

@ -12,7 +12,7 @@ import javax.crypto.spec.SecretKeySpec;
/** /**
* AES加密 * AES加密
* *
* @author lyy * author lyy
*/ */
public class AESEncryption { public class AESEncryption {
/** /**

@ -11,6 +11,9 @@ android {
versionName rootProject.ext.versionName versionName rootProject.ext.versionName
} }
buildTypes { buildTypes {
debug{
debuggable true
}
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
@ -24,9 +27,13 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
// implementation "androidx.appcompat:appcompat:${rootProject.ext.XAppcompatVersion}" // implementation "androidx.appcompat:appcompat:${rootProject.ext.XAppcompatVersion}"
api project(':AriaAnnotations') api project(path: ':AriaAnnotations')
api project(path: ':PublicComponent') api project(path: ':PublicComponent')
api project(path: ':HttpComponent') api project(path: ':HttpComponent')
} }
apply from: 'bintray-release.gradle' //apply from: 'bintray-release.gradle'
ext{
PUBLISH_ARTIFACT_ID = 'core'
}
apply from: '../gradle/mavenCentral-release.gradle'

@ -20,7 +20,7 @@ import com.arialyy.aria.core.task.DownloadGroupTask;
/** /**
* @author ChenFei(chenfei0928 @ gmail.com) * @author ChenFei(chenfei0928 @ gmail.com)
* @date 2020-07-07 14:12 * Date: 2020-07-07 14:12
*/ */
public interface DownloadGroupTaskListener extends NormalTaskListenerInterface<DownloadGroupTask> { public interface DownloadGroupTaskListener extends NormalTaskListenerInterface<DownloadGroupTask> {
} }

@ -111,8 +111,8 @@ public class DownloadReceiver extends AbsReceiver {
/** /**
* 加载组合任务用于任务停止删除等操作 * 加载组合任务用于任务停止删除等操作
* *
* @param taskId 任务id可从{@link AbsBuilderTarget#create()}{@link AbsBuilderTarget#add()}{@link * @param taskId 任务id可从{@link AbsBuilderTarget#create}{@link AbsBuilderTarget#add}{@link
* * AbsEntity#getId()}读取任务id * AbsEntity#getId}读取任务id
*/ */
public GroupNormalTarget loadGroup(long taskId) { public GroupNormalTarget loadGroup(long taskId) {

@ -20,7 +20,7 @@ import com.arialyy.aria.core.task.DownloadTask;
/** /**
* @author ChenFei(chenfei0928@gmail.com) * @author ChenFei(chenfei0928@gmail.com)
* @date 2020-07-07 14:12 * Date: 2020-07-07 14:12
*/ */
public interface DownloadTaskListener extends NormalTaskListenerInterface<DownloadTask> { public interface DownloadTaskListener extends NormalTaskListenerInterface<DownloadTask> {
} }

@ -20,8 +20,8 @@ import com.arialyy.aria.core.common.AbsNormalTarget;
import java.util.List; import java.util.List;
/** /**
* @Author aria * @author aria
* @Date 2019-09-05 * Date: 2019-09-05
*/ */
public class DTargetFactory { public class DTargetFactory {

@ -20,8 +20,8 @@ import com.arialyy.aria.core.download.DownloadEntity;
import com.arialyy.aria.core.wrapper.ITaskWrapper; import com.arialyy.aria.core.wrapper.ITaskWrapper;
/** /**
* @Author aria * @author aria
* @Date 2019-09-06 * Date: 2019-09-06
*/ */
public class TcpBuilderTarget extends AbsBuilderTarget<TcpBuilderTarget> { public class TcpBuilderTarget extends AbsBuilderTarget<TcpBuilderTarget> {

@ -21,8 +21,8 @@ import com.arialyy.aria.util.ALog;
import java.nio.charset.Charset; import java.nio.charset.Charset;
/** /**
* @Author aria * @author aria
* @Date 2019-09-06 * Date: 2019-09-06
*/ */
public class TcpDelegate extends BaseOption { public class TcpDelegate extends BaseOption {

@ -18,8 +18,8 @@ package com.arialyy.aria.core.download.tcp;
/** /**
* tcp任务配置 * tcp任务配置
* *
* @Author aria * @author aria
* @Date 2019-09-06 * Date: 2019-09-06
*/ */
public class TcpTaskConfig { public class TcpTaskConfig {

@ -19,7 +19,7 @@ package com.arialyy.aria.core.scheduler;
* 直接实现监听器回调接口的基类不对外部直接开放仅作为内部监听器的父接口使用 * 直接实现监听器回调接口的基类不对外部直接开放仅作为内部监听器的父接口使用
* *
* @author ChenFei(chenfei0928 @ gmail.com) * @author ChenFei(chenfei0928 @ gmail.com)
* @date 2020-07-07 15:18 * Date: 2020-07-07 15:18
*/ */
public interface TaskInternalListenerInterface { public interface TaskInternalListenerInterface {
} }

@ -22,7 +22,7 @@ import com.arialyy.aria.core.task.UploadTask;
* 上传任务接口 * 上传任务接口
* *
* @author ChenFei(chenfei0928 @ gmail.com) * @author ChenFei(chenfei0928 @ gmail.com)
* @date 2020-07-07 13:23 * Date: 2020-07-07 13:23
*/ */
public interface UploadTaskListener extends NormalTaskListenerInterface<UploadTask> { public interface UploadTaskListener extends NormalTaskListenerInterface<UploadTask> {
} }

@ -19,8 +19,8 @@ import com.arialyy.aria.core.common.AbsBuilderTarget;
import com.arialyy.aria.core.common.AbsNormalTarget; import com.arialyy.aria.core.common.AbsNormalTarget;
/** /**
* @Author aria * @author aria
* @Date 2019-09-05 * Date: 2019-09-05
*/ */
public class UTargetFactory { public class UTargetFactory {

@ -11,4 +11,9 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) compile fileTree(dir: 'libs', include: ['*.jar'])
} }
apply from: 'bintray-release.gradle' //apply from: 'bintray-release.gradle'
ext{
PUBLISH_ARTIFACT_ID = 'annotations'
}
apply from: '../gradle/mavenCentral-release.gradle'

@ -15,4 +15,8 @@ dependencies {
implementation project(':AriaAnnotations') implementation project(':AriaAnnotations')
} }
apply from: 'bintray-release.gradle' //apply from: 'bintray-release.gradle'
ext{
PUBLISH_ARTIFACT_ID = 'compiler'
}
apply from: '../gradle/mavenCentral-release.gradle'

@ -1,9 +1,10 @@
## 开发日志 ## 开发日志
+ v_3.8.16 + v_3.8.16 (2021/4/18)
- 修复单线程下载时,文件已经完成,重复下载回调下载失败的问题 - 修复单线程下载时,文件已经完成,重复下载回调下载失败的问题
- 修复一个重新下载文件时,同名路径文件没有被被删除的问题 - 修复一个重新下载文件时,同名路径文件没有被被删除的问题
- fix bug https://github.com/AriaLyy/Aria/issues/807 - fix bug https://github.com/AriaLyy/Aria/issues/807
- fix bug https://github.com/AriaLyy/Aria/issues/811 - fix bug https://github.com/AriaLyy/Aria/issues/811
- fix bug https://github.com/AriaLyy/Aria/issues/851
- 修复组合任务在获取子任务信息的过程中,手动停止或删除,没有回调的问题 - 修复组合任务在获取子任务信息的过程中,手动停止或删除,没有回调的问题
+ v_3.8.15 (2020/11/9) + v_3.8.15 (2020/11/9)
- 修复不支持断点的连接下载失败问题,https://github.com/AriaLyy/Aria/issues/771 - 修复不支持断点的连接下载失败问题,https://github.com/AriaLyy/Aria/issues/771

@ -15,6 +15,9 @@ android {
} }
buildTypes { buildTypes {
debug{
debuggable true
}
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
@ -32,4 +35,8 @@ dependencies {
implementation project(path: ':PublicComponent') implementation project(path: ':PublicComponent')
} }
apply from: 'bintray-release.gradle' //apply from: 'bintray-release.gradle'
ext{
PUBLISH_ARTIFACT_ID = 'ftp'
}
apply from: '../gradle/mavenCentral-release.gradle'

@ -34,8 +34,8 @@ import java.net.UnknownHostException;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-18 * Date: 2019-09-18
*/ */
public abstract class BaseFtpThreadTaskAdapter extends AbsThreadTaskAdapter { public abstract class BaseFtpThreadTaskAdapter extends AbsThreadTaskAdapter {

@ -25,8 +25,8 @@ import com.arialyy.aria.core.loader.NormalThreadStateManager;
import com.arialyy.aria.ftp.FtpTaskOption; import com.arialyy.aria.ftp.FtpTaskOption;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-19 * Date: 2019-09-19
*/ */
public final class FtpDLoaderUtil extends AbsNormalLoaderUtil { public final class FtpDLoaderUtil extends AbsNormalLoaderUtil {

@ -27,8 +27,8 @@ import com.arialyy.aria.util.RecordUtil;
import java.util.ArrayList; import java.util.ArrayList;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-19 * Date: 2019-09-19
*/ */
final class FtpDRecordHandler extends RecordHandler { final class FtpDRecordHandler extends RecordHandler {

@ -32,8 +32,8 @@ import java.nio.channels.FileChannel;
import java.nio.channels.ReadableByteChannel; import java.nio.channels.ReadableByteChannel;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-18 * Date: 2019-09-18
*/ */
final class FtpDThreadTaskAdapter extends BaseFtpThreadTaskAdapter { final class FtpDThreadTaskAdapter extends BaseFtpThreadTaskAdapter {

@ -25,8 +25,8 @@ import com.arialyy.aria.core.loader.NormalTTBuilder;
import com.arialyy.aria.core.loader.SubLoader; import com.arialyy.aria.core.loader.SubLoader;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-28 * Date: 2019-09-28
*/ */
final class FtpSubDLoaderUtil extends AbsSubDLoadUtil { final class FtpSubDLoaderUtil extends AbsSubDLoadUtil {
/** /**

@ -28,8 +28,8 @@ import com.arialyy.aria.core.upload.UTaskWrapper;
import com.arialyy.aria.ftp.FtpTaskOption; import com.arialyy.aria.ftp.FtpTaskOption;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-19 * Date: 2019-09-19
*/ */
public final class FtpULoaderUtil extends AbsNormalLoaderUtil { public final class FtpULoaderUtil extends AbsNormalLoaderUtil {

@ -14,6 +14,9 @@ android {
} }
buildTypes { buildTypes {
debug{
debuggable true
}
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
@ -31,4 +34,8 @@ dependencies {
implementation project(path: ':PublicComponent') implementation project(path: ':PublicComponent')
} }
apply from: 'bintray-release.gradle' //apply from: 'bintray-release.gradle'
ext{
PUBLISH_ARTIFACT_ID = 'http'
}
apply from: '../gradle/mavenCentral-release.gradle'

@ -20,8 +20,8 @@ import com.arialyy.aria.core.common.SubThreadConfig;
import com.arialyy.aria.core.task.AbsThreadTaskAdapter; import com.arialyy.aria.core.task.AbsThreadTaskAdapter;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-22 * Date: 2019-09-22
*/ */
public abstract class BaseHttpThreadTaskAdapter extends AbsThreadTaskAdapter { public abstract class BaseHttpThreadTaskAdapter extends AbsThreadTaskAdapter {
protected HttpTaskOption mTaskOption; protected HttpTaskOption mTaskOption;

@ -48,8 +48,6 @@ public final class ConnectionHelp {
/** /**
* 处理url参数 * 处理url参数
*
* @throws MalformedURLException
*/ */
public static URL handleUrl(String url, HttpTaskOption taskDelegate) public static URL handleUrl(String url, HttpTaskOption taskDelegate)
throws MalformedURLException { throws MalformedURLException {
@ -127,8 +125,6 @@ public final class ConnectionHelp {
/** /**
* 设置头部参数 * 设置头部参数
*
* @throws ProtocolException
*/ */
public static HttpURLConnection setConnectParam(HttpTaskOption delegate, HttpURLConnection conn) { public static HttpURLConnection setConnectParam(HttpTaskOption delegate, HttpURLConnection conn) {
if (delegate.getRequestEnum() == RequestEnum.POST) { if (delegate.getRequestEnum() == RequestEnum.POST) {

@ -28,8 +28,8 @@ import com.arialyy.aria.util.RecordUtil;
import java.util.ArrayList; import java.util.ArrayList;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-23 * Date: 2019-09-23
*/ */
public final class HttpRecordHandler extends RecordHandler { public final class HttpRecordHandler extends RecordHandler {
public HttpRecordHandler(AbsTaskWrapper wrapper) { public HttpRecordHandler(AbsTaskWrapper wrapper) {

@ -29,8 +29,8 @@ import com.arialyy.aria.http.HttpRecordHandler;
import com.arialyy.aria.http.HttpTaskOption; import com.arialyy.aria.http.HttpTaskOption;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-21 * Date: 2019-09-21
*/ */
public final class HttpDLoaderUtil extends AbsNormalLoaderUtil { public final class HttpDLoaderUtil extends AbsNormalLoaderUtil {

@ -25,8 +25,8 @@ import com.arialyy.aria.core.loader.NormalTTBuilder;
import com.arialyy.aria.core.loader.SubLoader; import com.arialyy.aria.core.loader.SubLoader;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-28 * Date: 2019-09-28
*/ */
final class HttpSubDLoaderUtil extends AbsSubDLoadUtil { final class HttpSubDLoaderUtil extends AbsSubDLoadUtil {
/** /**

@ -29,8 +29,8 @@ import com.arialyy.aria.http.HttpRecordHandler;
import com.arialyy.aria.http.HttpTaskOption; import com.arialyy.aria.http.HttpTaskOption;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-19 * Date: 2019-09-19
*/ */
public final class HttpULoaderUtil extends AbsNormalLoaderUtil { public final class HttpULoaderUtil extends AbsNormalLoaderUtil {

@ -15,6 +15,9 @@ android {
} }
buildTypes { buildTypes {
debug{
debuggable true
}
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
@ -33,4 +36,8 @@ dependencies {
implementation project(path: ':PublicComponent') implementation project(path: ':PublicComponent')
} }
apply from: 'bintray-release.gradle' //apply from: 'bintray-release.gradle'
ext{
PUBLISH_ARTIFACT_ID = 'm3u8'
}
apply from: '../gradle/mavenCentral-release.gradle'

@ -7,11 +7,8 @@ public final class IdGenerator {
* <p> * <p>
* 主要就是三部分 时间戳进程id序列号 时间戳41id10位序列号12位 * 主要就是三部分 时间戳进程id序列号 时间戳41id10位序列号12位
* *
* @author chiwei
* @param args
* @since JDK 1.6 * @since JDK 1.6
*/ */
private static volatile IdGenerator INSTANCE = null; private static volatile IdGenerator INSTANCE = null;
private final static long beginTs = 1483200000000L; private final static long beginTs = 1483200000000L;

@ -31,8 +31,8 @@ import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-24 * Date: 2019-09-24
*/ */
final class VodRecordHandler extends RecordHandler { final class VodRecordHandler extends RecordHandler {
private M3U8TaskOption mOption; private M3U8TaskOption mOption;

@ -15,6 +15,9 @@ android {
} }
buildTypes { buildTypes {
debug{
debuggable true
}
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
@ -32,4 +35,8 @@ dependencies {
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
} }
apply from: 'bintray-release.gradle' //apply from: 'bintray-release.gradle'
ext{
PUBLISH_ARTIFACT_ID = 'public'
}
apply from: '../gradle/mavenCentral-release.gradle'

@ -38,8 +38,8 @@ import java.util.Map;
/** /**
* 任务配置参数 * 任务配置参数
* *
* @Author lyy * @author lyy
* @Date 2019-09-10 * Date: 2019-09-10
*/ */
public class TaskOptionParams { public class TaskOptionParams {

@ -29,8 +29,8 @@ import java.io.IOException;
/** /**
* 任务记录帮助类用于处理统一的逻辑 * 任务记录帮助类用于处理统一的逻辑
* *
* @Author lyy * @author lyy
* @Date 2019-09-19 * Date: 2019-09-19
*/ */
public class RecordHelper { public class RecordHelper {
private String TAG = CommonUtil.getClassName(getClass()); private String TAG = CommonUtil.getClassName(getClass());

@ -18,8 +18,8 @@ package com.arialyy.aria.core.inf;
/** /**
* 事件处理对象 * 事件处理对象
* *
* @Author lyy * @author lyy
* @Date 2019-09-10 * Date: 2019-09-10
*/ */
public interface IEventHandler { public interface IEventHandler {
} }

@ -16,8 +16,8 @@
package com.arialyy.aria.core.inf; package com.arialyy.aria.core.inf;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-10 * Date: 2019-09-10
*/ */
public interface IOptionConstant { public interface IOptionConstant {
// ftp 任务设置常量 // ftp 任务设置常量

@ -21,8 +21,8 @@ import com.arialyy.aria.core.wrapper.AbsTaskWrapper;
import com.arialyy.aria.core.common.SubThreadConfig; import com.arialyy.aria.core.common.SubThreadConfig;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-18 * Date: 2019-09-18
*/ */
public interface ILoaderAdapter { public interface ILoaderAdapter {

@ -19,8 +19,8 @@ import com.arialyy.aria.core.TaskRecord;
import com.arialyy.aria.core.ThreadRecord; import com.arialyy.aria.core.ThreadRecord;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-18 * Date: 2019-09-18
*/ */
public interface IRecordHandler extends ILoaderComponent { public interface IRecordHandler extends ILoaderComponent {

@ -21,8 +21,8 @@ import java.lang.reflect.Method;
import java.lang.reflect.Proxy; import java.lang.reflect.Proxy;
/** /**
* @Author lyy * @author lyy
* @Date 2019-10-7 * Date: 2019-10-7
* 处理器的动态代理 * 处理器的动态代理
*/ */
public class ProxyHandler implements InvocationHandler { public class ProxyHandler implements InvocationHandler {

@ -24,8 +24,8 @@ import com.arialyy.aria.util.BandwidthLimiter;
import com.arialyy.aria.util.CommonUtil; import com.arialyy.aria.util.CommonUtil;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-18 * Date: 2019-09-18
*/ */
public abstract class AbsThreadTaskAdapter implements IThreadTaskAdapter { public abstract class AbsThreadTaskAdapter implements IThreadTaskAdapter {

@ -18,8 +18,8 @@ package com.arialyy.aria.core.task;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-18 * Date: 2019-09-18
*/ */
public interface IThreadTask extends Callable<IThreadTask> { public interface IThreadTask extends Callable<IThreadTask> {

@ -18,8 +18,8 @@ package com.arialyy.aria.core.task;
/** /**
* 线程适配器 * 线程适配器
* *
* @Author lyy * @author lyy
* @Date 2019-09-18 * Date: 2019-09-18
*/ */
public interface IThreadTaskAdapter { public interface IThreadTaskAdapter {

@ -22,8 +22,8 @@ import com.arialyy.aria.exception.AriaException;
/** /**
* 线程任务观察者 * 线程任务观察者
* *
* @Author lyy * @author lyy
* @Date 2019-09-18 * Date: 2019-09-18
*/ */
public interface IThreadTaskObserver { public interface IThreadTaskObserver {

@ -34,8 +34,8 @@ import java.util.List;
/** /**
* 组件工具用于跨组件创建对应的工具类 * 组件工具用于跨组件创建对应的工具类
* *
* @Author lyy * @author lyy
* @Date 2019-09-23 * Date: 2019-09-23
*/ */
public class ComponentUtil { public class ComponentUtil {
public static final int COMPONENT_TYPE_HTTP = 1; public static final int COMPONENT_TYPE_HTTP = 1;

@ -53,11 +53,11 @@ Aria有以下特点:
```java ```java
implementation 'com.arialyy.aria:core:3.8.15' implementation 'me.laoyuyu.aria:core:3.8.16'
annotationProcessor 'com.arialyy.aria:compiler:3.8.15' annotationProcessor 'me.laoyuyu.aria:compiler:3.8.16'
implementation 'com.arialyy.aria:ftpComponent:3.8.15' # 如果需要使用ftp,请增加该组件 implementation 'me.laoyuyu.aria:ftp:3.8.16' # 如果需要使用ftp,请增加该组件
implementation 'com.arialyy.aria:sftpComponent:3.8.15' # 如果需要使用ftp,请增加该组件 implementation 'me.laoyuyu.aria:sftp:3.8.16' # 如果需要使用ftp,请增加该组件
implementation 'com.arialyy.aria:m3u8Component:3.8.15' # 如果需要使用m3u8下载功能,请增加该组件 implementation 'me.laoyuyu.aria:m3u8:3.8.16' # 如果需要使用m3u8下载功能,请增加该组件
``` ```
如果你使用的是kotlin,请使用kotlin官方提供的方法配置apt,[kotlin kapt官方配置传送门](https://www.kotlincn.net/docs/reference/kapt.html) 如果你使用的是kotlin,请使用kotlin官方提供的方法配置apt,[kotlin kapt官方配置传送门](https://www.kotlincn.net/docs/reference/kapt.html)
@ -138,11 +138,13 @@ protected void onCreate(Bundle savedInstanceState) {
### 版本日志 ### 版本日志
+ v_3.8.15 (2020/11/9) + v_3.8.16
- 修复不支持断点的连接下载失败问题,https://github.com/AriaLyy/Aria/issues/771 - 修复单线程下载时,文件已经完成,重复下载回调下载失败的问题
- 修复iv不存在时,索引文件异常的问题,https://github.com/AriaLyy/Aria/issues/780 - 修复一个重新下载文件时,同名路径文件没有被被删除的问题
- fix bug https://github.com/AriaLyy/Aria/issues/799 - fix bug https://github.com/AriaLyy/Aria/issues/807
- fix bug https://github.com/AriaLyy/Aria/issues/798 - fix bug https://github.com/AriaLyy/Aria/issues/811
- fix bug https://github.com/AriaLyy/Aria/issues/851
- 修复组合任务在获取子任务信息的过程中,手动停止或删除,没有回调的问题
[更多版本记录](https://github.com/AriaLyy/Aria/blob/master/DEV_LOG.md) [更多版本记录](https://github.com/AriaLyy/Aria/blob/master/DEV_LOG.md)

@ -15,6 +15,9 @@ android {
} }
buildTypes { buildTypes {
debug{
debuggable true
}
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
@ -34,4 +37,8 @@ dependencies {
implementation project(path: ':PublicComponent') implementation project(path: ':PublicComponent')
} }
apply from: 'bintray-release.gradle' //apply from: 'bintray-release.gradle'
ext{
PUBLISH_ARTIFACT_ID = 'sftp'
}
apply from: '../gradle/mavenCentral-release.gradle'

@ -27,8 +27,8 @@ import com.arialyy.aria.util.RecordUtil;
import java.util.ArrayList; import java.util.ArrayList;
/** /**
* @Author lyy * @author lyy
* @Date 2019-09-19 * Date: 2019-09-19
*/ */
final class SFtpDRecordHandler extends RecordHandler { final class SFtpDRecordHandler extends RecordHandler {

@ -30,6 +30,10 @@ android {
} }
buildTypes { buildTypes {
debug {
debuggable true
minifyEnabled false //
}
release { release {
zipAlignEnabled true zipAlignEnabled true
minifyEnabled true minifyEnabled true
@ -50,11 +54,6 @@ android {
lintOptions { lintOptions {
abortOnError false abortOnError false
} }
// sourceSets {
// main.kotlin.srcDirs += 'src/main/kotlin'
// main.java.srcDirs += 'src/main/java'
// }
} }
dependencies { dependencies {

@ -16,6 +16,6 @@
<declare-styleable name="SvgTextView"> <declare-styleable name="SvgTextView">
<attr format="reference" name="svg_text_view_icon"/> <attr format="reference" name="svg_text_view_icon"/>
<attr name="text"/> <attr format="reference" name="text"/>
</declare-styleable> </declare-styleable>
</resources> </resources>

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
// ext.kotlin_version = '1.3.20' // ext.kotlin_version = '1.3.20'
ext.kotlin_version = '1.3.41' ext.kotlin_version = '1.4.30'
repositories { repositories {
jcenter() jcenter()
mavenCentral() mavenCentral()
@ -9,12 +9,10 @@ buildscript {
maven { url 'https://jitpack.io' } maven { url 'https://jitpack.io' }
} }
dependencies { dependencies {
// classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:4.1.3'
// classpath 'com.android.tools.build:gradle:3.3.2' // classpath 'com.novoda:bintray-release:0.9.1'
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.novoda:bintray-release:0.9.1'
// classpath 'com.novoda:bintray-release:0.9'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.4.30" // kotlin
// classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7' // classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
// classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' // classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
@ -52,13 +50,26 @@ ext {
// publishVersion = '1.0.4' //FTP插件 // publishVersion = '1.0.4' //FTP插件
repoName='maven' repoName='maven'
// repoName='aria' // repoName='aria'
desc = 'android 下载框架' desc = 'android 下载框架'
website = 'https://github.com/AriaLyy/Aria' website = 'https://github.com/AriaLyy/Aria'
licences = ['Apache-2.0'] licences = ['Apache-2.0']
// mavenCentral
mavenVersion = '3.8.16'
mavenCentralGroupId = 'me.laoyuyu.aria'
mavenCentralUserID = 'laoyuyu'
mavenCentralUserName = 'laoyuyu'
mavenCentralEmail = '511455842@qq.com'
mavenCentralLicences = 'Apache-2.0'
mavenCentralLicencesURL = 'https://www.apache.org/licenses/LICENSE-2.0'
mavenCentralConnection = 'scm:git:github.com/AriaLyy/Aria.git'
mavenCentralDeveloperConnection = 'scm:git:ssh://github.com/AriaLyy/Aria.git'
mavenCentralTreeURL = 'https://github.com/AriaLyy/KeepassA/tree/master'
compileSdkVersion = 28 compileSdkVersion = 28
supportLibVersion = "27.1.1" supportLibVersion = "27.1.1"
buildToolsVersion = "28.0.3" buildToolsVersion = "29.0.2"
targetSdkVersion = 28 targetSdkVersion = 28
lifecycleVersion = "1.1.1" lifecycleVersion = "1.1.1"
minSdkVersion = 15 minSdkVersion = 15

@ -26,3 +26,6 @@ android.enableJetifier=true
#org.gradle.daemon=true #org.gradle.daemon=true
#org.gradle.jvmargs=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 #org.gradle.jvmargs=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
ISLOCAL=false
JAR_PREFIX=aria-
JAR_POSTFIX=core

@ -0,0 +1,216 @@
apply plugin: 'maven-publish'
apply plugin: 'signing'
ext {
PUBLISH_GROUP_ID = rootProject.ext.mavenCentralGroupId
PUBLISH_VERSION = rootProject.ext.mavenVersion
}
//groovy代码时采用 UTF-8
tasks.withType(GroovyCompile) {
groovyOptions.encoding = "UTF-8"
}
//JAVA文件时采用UTF-8
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
// java doc utf-8
// https://docs.gradle.org/current/dsl/org.gradle.api.tasks.javadoc.Javadoc.html#org.gradle.api.tasks.javadoc.Javadoc:options
tasks.withType(Javadoc) {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
options {
encoding "UTF-8"
charSet 'UTF-8'
links "http://docs.oracle.com/javase/7/docs/api"
addStringOption('Xdoclint:none', '-quiet') // @params @return
}
}
ext["signing.keyId"] = ''
ext["signing.password"] = ''
ext["signing.secretKeyRingFile"] = ''
ext["ossrhUsername"] = ''
ext["ossrhPassword"] = ''
File secretPropsFile = project.rootProject.file('local.properties')
if (secretPropsFile.exists()) {
println "Found secret props file, loading props"
Properties p = new Properties()
p.load(new FileInputStream(secretPropsFile))
p.each { name, value ->
ext[name] = value
}
} else {
println "No props file, loading env vars"
}
static def localMavenRepo() {
'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath
}
def getReleaseRepositoryUrl() {
return isLocal() ? localMavenRepo()
: hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
: 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
}
def getSnapshotRepositoryUrl() {
return isLocal() ? localMavenRepo()
: hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
: 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
}
def isLocal(){
return ISLOCAL == 'true'
}
afterEvaluate { project ->
if (isLocal()) {
println("上传到本地仓库")
} else {
println("上传到中央仓库")
}
publishing {
def isAndroidProject = project.plugins.hasPlugin('com.android.application') || project.
plugins.
hasPlugin('com.android.library')
publications {
release(MavenPublication) {
// groupId
groupId PUBLISH_GROUP_ID
artifactId PUBLISH_ARTIFACT_ID
version PUBLISH_VERSION
if (isAndroidProject) {
// R文件BuildConfig文件
generateReleaseBuildConfig.enabled = false
generateDebugBuildConfig.enabled = false
generateReleaseResValues.enabled = false
generateDebugResValues.enabled = false
// 使aarpom.withxml了
from components.release
def variants = project.android.libraryVariants.findAll {
it.buildType.name.equalsIgnoreCase('debug')
}
def getAndroidSdkDirectory = project.android.sdkDirectory
def getAndroidJar = "${getAndroidSdkDirectory}/platforms/${project.android.compileSdkVersion}/android.jar"
task androidJavadocs(type: Javadoc, dependsOn: assembleDebug) {
println("开始打包aar")
source = variants.collect { it.getJavaCompileProvider().get().source }
classpath = files(
getAndroidJar,
project.file("build/intermediates/classes/debug")
)
doFirst {
classpath += files(variants.collect { it.javaCompile.classpath.files })
}
options {
links("http://docs.oracle.com/javase/7/docs/api/")
linksOffline("http://d.android.com/reference",
"${getAndroidSdkDirectory}/docs/reference")
encoding "UTF-8"
charSet 'UTF-8'
addStringOption('Xdoclint:none', '-quiet') // @params @return
}
exclude '**/R.java'
exclude "**/BuildConfig.class"
}
def cleanJavadocTask = task("cleanJavadocTask", type: Delete) {
delete androidJavadocs.destinationDir
} as Task
project.clean.dependsOn(cleanJavadocTask)
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
baseName "${JAR_PREFIX}${project.name}"
}
task androidSourcesJar(type: Jar) {
classifier = 'sources'
from project.android.sourceSets.main.java.source
baseName "${JAR_PREFIX}${project.name}"
exclude "**/R.class"
exclude "**/BuildConfig.class"
}
task androidLibraryJar(type: Jar, dependsOn: compileDebugJavaWithJavac
/* == variant.javaCompile */) {
// java class文件, build/intermediates/classes/debug/
from compileDebugJavaWithJavac.destinationDir
// kotlin class文件
from 'build/tmp/kotlin-classes/debug/'
// jar
// include('libs/**')
exclude '**/R.class'
exclude '**/R$*.class'
exclude "**/BuildConfig.class"
baseName "${JAR_PREFIX}${project.name}-cache"
}
artifact androidLibraryJar
artifact androidSourcesJar
artifact androidJavadocsJar
} else if (project.plugins.hasPlugin('java')) {
from components.java
}
pom {
name = PUBLISH_ARTIFACT_ID
description = rootProject.ext.desc
url = rootProject.ext.website
licenses {
license {
//Apache License2.0
name = rootProject.ext.mavenCentralLicences
url = rootProject.ext.mavenCentralLicencesURL
}
}
developers {
developer {
id = rootProject.ext.mavenCentralUserID
name = rootProject.ext.mavenCentralUserName
email = rootProject.ext.mavenCentralEmail
}
}
scm {
//Git地址
connection = rootProject.ext.mavenCentralConnection
developerConnection = rootProject.ext.mavenCentralDeveloperConnection
//
url = rootProject.ext.mavenCentralTreeURL
}
}
}
}
repositories {
maven {
name = "mavencentral"
def releasesRepoUrl = getReleaseRepositoryUrl()
def snapshotsRepoUrl = getSnapshotRepositoryUrl()
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
signing {
sign publishing.publications
}
}

@ -4,4 +4,5 @@ distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip #distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip #distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

Loading…
Cancel
Save