
package com.ydl.component.base;

import android.content.Context;
import com.ydl.component.BuildConfig;
import com.yidianling.ydlcommon.core.base.config.IConfigModule;
import com.yidianling.ydlcommon.core.base.delegate.IAppLifecycles;
import com.yidianling.ydlcommon.core.base.config.GlobalConfig;
import org.jetbrains.annotations.NotNull;

import java.util.List;

/**
 * Created by haorui on 2019-09-01 .
 * Des:
 */
public final class DemoGlobalConfig implements IConfigModule {
    String APP_DOMAIN = "https://api.github.com/";

    @Override
    public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
        lifecycles.add(new DemoAppLifecycles());
    }

    @Override
    public void applyOptions(@NotNull Context context, @NotNull GlobalConfig.Builder builder) {
        builder.setDebug(BuildConfig.DEBUG);
        builder.addUrl("github", APP_DOMAIN);
    }
}
