<file_sep>package com.leslie.task_annotation;

/**
 * 任务属性
 *
 * 作者：xjzhao
 * 时间：2021-06-30 15:06
 */
public class TaskMeta {

    private TaskType type;
    private int priority;
    private long delayMills;
    private Class<?> cls;

    private TaskMeta(TaskType type, int priority, long delayMills, Class<?> cls) {
        this.type = type;
        this.priority = priority;
        this.delayMills = delayMills;
        this.cls = cls;
    }

    public static TaskMeta build(TaskType type, int priority, long delayMills, Class<?> cls){
        return new TaskMeta(type, priority, delayMills, cls);
    }

    public TaskType getType() {
        return type;
    }

    public int getPriority() {
        return priority;
    }

    public long getDelayMills() {
        return delayMills;
    }

    public Class<?> getCls() {
        return cls;
    }

}
<file_sep>rootProject.name='annotation'
include ':app'
include ':task-annotation'
<file_sep># task-annotation
Android启动任务管理器依赖的annotation

在task-api中使用，详见：[task-api](https://github.com/xjz-111/task-api)
<file_sep>apply plugin: 'java-library'
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.xjz-111'

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])


}

sourceCompatibility = "7"
targetCompatibility = "7"

java{
    task sourcesJar(type: Jar, dependsOn:classes) {
        classifier = 'sources'
        from sourceSets.main.allSource
    }

    task javadocJar(type: Jar, dependsOn:javadoc) {
        classifier = 'javadoc'
        from javadoc.destinationDir
    }

    if (JavaVersion.current().isJava8Compatible()) {
        allprojects {
            tasks.withType(Javadoc) {
                options.addStringOption('Xdoclint:none', '-quiet')
            }
        }
    }

    artifacts {
        archives sourcesJar
        archives javadocJar
    }
}


buildscript {

    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.3'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}<file_sep>package com.leslie.task_annotation;

import java.util.List;

/**
 * 作者：xjzhao
 * 时间：2021-07-01 16:11
 */
public interface ITask {
    List<TaskMeta> getTasks();
}
