jcenter
This commit is contained in:
@ -1,12 +1,24 @@
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'bintray-release'
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||
targetCompatibility = JavaVersion.VERSION_1_7
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
}
|
||||
|
||||
sourceCompatibility = "1.7"
|
||||
targetCompatibility = "1.7"
|
||||
publish {
|
||||
artifactId = 'aria-annotations'
|
||||
userOrg = rootProject.userOrg
|
||||
groupId = rootProject.groupId
|
||||
uploadName = rootProject.uploadName
|
||||
publishVersion = rootProject.publishVersion
|
||||
description = rootProject.description
|
||||
website = rootProject.website
|
||||
licences = rootProject.licences
|
||||
}
|
@ -22,7 +22,16 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Created by Aria.Lao on 2017/6/6.
|
||||
* 下载注解
|
||||
* Aria下载事件被注解的方法中,参数仅能有一个,参数类型为{@link com.arialyy.aria.core.download.DownloadTask}
|
||||
* <pre>
|
||||
* <code>
|
||||
* protected void onPre(DownloadTask task) {
|
||||
* if (task.getKey().equals(DOWNLOAD_URL)) {
|
||||
* mUpdateHandler.obtainMessage(DOWNLOAD_PRE, task.getDownloadEntity().getFileSize()).sendToTarget();
|
||||
* }
|
||||
* }
|
||||
* </code>
|
||||
* </pre>
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface Download {
|
||||
/**
|
||||
@ -43,9 +52,6 @@ import java.lang.annotation.Target;
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onTaskResume {
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果你在方法中添加{@code @Download.onTaskStart}注解,在任务开始下载时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onTaskStart {
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,14 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Created by lyy on 2017/6/6.
|
||||
* Aria下载事件注解
|
||||
* Aria下载事件被注解的方法中,参数仅能有一个,参数类型为{@link com.arialyy.aria.core.upload.UploadTask}
|
||||
* <pre>
|
||||
* <code>
|
||||
* protected void onPre(UploadTask task) {
|
||||
* L.d(TAG, "fileSize = " + task.getConvertFileSize());
|
||||
* }
|
||||
* </code>
|
||||
* </pre>
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface Upload {
|
||||
|
||||
@ -44,9 +51,6 @@ import java.lang.annotation.Target;
|
||||
//@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onTaskResume {
|
||||
//}
|
||||
|
||||
/**
|
||||
* 如果你在方法中添加{@code @Upload.onTaskStart}注解,在任务开始下载时,Aria会调用该方法
|
||||
*/
|
||||
@Retention(RetentionPolicy.CLASS) @Target(ElementType.METHOD) public @interface onTaskStart {
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user