com.android.build.gradle.internal.dsl.DexOptions Java Examples

The following examples show how to use com.android.build.gradle.internal.dsl.DexOptions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AtlasMultiDexListTransform.java    From atlas with Apache License 2.0 5 votes vote down vote up
public AtlasMultiDexListTransform(VariantScope variantScope, DexOptions dexOptions) {
    super(variantScope);
    this.variantScope = variantScope;
    mainDexListFile = variantScope.getMainDexListFile();
    this.manifestKeepListProguardFile = variantScope.getManifestKeepListProguardFile();
    this.userMainDexKeepProguard = variantScope.getVariantConfiguration().getMultiDexKeepProguard();
    this.userMainDexKeepFile = variantScope.getVariantConfiguration().getMultiDexKeepFile();

}
 
Example #2
Source File: AndroidConfigHelper.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
public static void configure(
        @NonNull AndroidConfig model,
        @NonNull Instantiator instantiator) {
    model.setDefaultPublishConfig(BuilderConstants.RELEASE);
    model.setPublishNonDefault(false);
    model.setGeneratePureSplits(false);
    model.setPreProcessingOptions(instantiator.newInstance(PreprocessingOptions.class));
    model.setAaptOptions(instantiator.newInstance(AaptOptions.class));
    model.setDexOptions(instantiator.newInstance(DexOptions.class));
    model.setLintOptions(instantiator.newInstance(LintOptions.class));
    model.setCompileOptions(instantiator.newInstance(CompileOptions.class));
    model.setPackagingOptions(instantiator.newInstance(PackagingOptions.class));
    model.setSplits(instantiator.newInstance(Splits.class, instantiator));
    model.setLibraryRequests(Lists.<LibraryRequest>newArrayList());
}
 
Example #3
Source File: AndroidExtension.java    From javafxmobile-plugin with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public AndroidExtension(Project project, ToolingModelBuilderRegistry registry) {
    this.project = project;

    this.extraModelInfo = new ExtraModelInfo(new ProjectOptions(project), project.getLogger());

    this.signingConfig = project.getExtensions().create("signingConfig", SigningConfig.class, "signing");
    this.packagingOptions = project.getExtensions().create("packagingOptions", PackagingOptions.class);
    this.dexOptions = project.getExtensions().create("dexOptions", DexOptions.class, extraModelInfo);

    try {
        this.buildCache = FileCache.getInstanceWithMultiProcessLocking(new File(AndroidLocation.getFolder(), "build-cache"));
    } catch (AndroidLocation.AndroidLocationException e) {
        throw new RuntimeException(e);
    }

    LoggerWrapper loggerWrapper = new LoggerWrapper(project.getLogger());

    this.sdkHandler = new SdkHandler(project, loggerWrapper);
    this.androidBuilder = new AndroidBuilder(
            project == project.getRootProject() ? project.getName() : project.getPath(),
            "JavaFX Mobile",
            new GradleProcessExecutor(project),
            new GradleJavaProcessExecutor(project),
            extraModelInfo,
            loggerWrapper,
            false);

    this.androidTaskRegistry = new AndroidTaskRegistry();
    this.taskFactory = new TaskContainerAdaptor(project.getTasks());

    installDirectory = new File(project.getBuildDir(), "javafxports/android");
    project.getLogger().info("Android install directory: " + installDirectory);

    temporaryDirectory = new File(project.getBuildDir(), "javafxports/tmp/android");
    project.getLogger().info("Android temporary output directory: " + temporaryDirectory);

    resourcesDirectory = new File(temporaryDirectory, "resources");
    resourcesDirectory.mkdirs();
    project.getLogger().info("Resources directory: " + resourcesDirectory);

    multidexOutputDirectory = new File(temporaryDirectory, "multi-dex");
    multidexOutputDirectory.mkdirs();
    project.getLogger().info("Multi-dex output directory: " + multidexOutputDirectory);

    dexOutputDirectory = new File(temporaryDirectory, "dex");
    dexOutputDirectory.mkdirs();
    project.getLogger().info("Dex output directory: " + dexOutputDirectory);
}
 
Example #4
Source File: AndroidExtension.java    From javafxmobile-plugin with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public DexOptions getDexOptions() {
    return dexOptions;
}
 
Example #5
Source File: Dex.java    From atlas with Apache License 2.0 4 votes vote down vote up
@Nested
public DexOptions getDexOptions() {
    return dexOptions;
}
 
Example #6
Source File: Dex.java    From atlas with Apache License 2.0 4 votes vote down vote up
public void setDexOptions(DexOptions dexOptions) {
    this.dexOptions = dexOptions;
}
 
Example #7
Source File: Dex.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
public DexOptions getDexOptions() {
    return dexOptions;
}
 
Example #8
Source File: Dex.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
public void setDexOptions(DexOptions dexOptions) {
    this.dexOptions = dexOptions;
}
 
Example #9
Source File: BaseExtension.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
BaseExtension(
        @NonNull final ProjectInternal project,
        @NonNull Instantiator instantiator,
        @NonNull AndroidBuilder androidBuilder,
        @NonNull SdkHandler sdkHandler,
        @NonNull NamedDomainObjectContainer<BuildType> buildTypes,
        @NonNull NamedDomainObjectContainer<ProductFlavor> productFlavors,
        @NonNull NamedDomainObjectContainer<SigningConfig> signingConfigs,
        @NonNull ExtraModelInfo extraModelInfo,
        final boolean isLibrary) {
    this.androidBuilder = androidBuilder;
    this.sdkHandler = sdkHandler;
    this.buildTypes = buildTypes;
    //noinspection unchecked
    this.productFlavors = (NamedDomainObjectContainer) productFlavors;
    this.signingConfigs = signingConfigs;
    this.extraModelInfo = extraModelInfo;
    this.project = project;

    logger = Logging.getLogger(this.getClass());

    defaultConfig = instantiator.newInstance(ProductFlavor.class, BuilderConstants.MAIN,
            project, instantiator, project.getLogger());

    aaptOptions = instantiator.newInstance(AaptOptions.class);
    dexOptions = instantiator.newInstance(DexOptions.class);
    lintOptions = instantiator.newInstance(LintOptions.class);
    compileOptions = instantiator.newInstance(CompileOptions.class);
    packagingOptions = instantiator.newInstance(PackagingOptions.class);
    preprocessingOptions = instantiator.newInstance(PreprocessingOptions.class);
    splits = instantiator.newInstance(Splits.class, instantiator);

    sourceSetsContainer = project.container(AndroidSourceSet.class,
            new AndroidSourceSetFactory(instantiator, project, isLibrary));

    sourceSetsContainer.whenObjectAdded(new Action<AndroidSourceSet>() {
        @Override
        public void execute(AndroidSourceSet sourceSet) {
            ConfigurationContainer configurations = project.getConfigurations();

            createConfiguration(
                    configurations,
                    sourceSet.getCompileConfigurationName(),
                    "Classpath for compiling the " + sourceSet.getName() + " sources.");

            String packageConfigDescription;
            if (isLibrary) {
                packageConfigDescription
                        = "Classpath only used when publishing '" + sourceSet.getName() + "'.";
            } else {
                packageConfigDescription
                        = "Classpath packaged with the compiled '" + sourceSet.getName() + "' classes.";
            }
            createConfiguration(
                    configurations,
                    sourceSet.getPackageConfigurationName(),
                    packageConfigDescription);

            createConfiguration(
                    configurations,
                    sourceSet.getProvidedConfigurationName(),
                    "Classpath for only compiling the " + sourceSet.getName() + " sources.");

            createConfiguration(
                    configurations,
                    sourceSet.getWearAppConfigurationName(),
                    "Link to a wear app to embed for object '" + sourceSet.getName() + "'.");

            sourceSet.setRoot(String.format("src/%s", sourceSet.getName()));
        }
    });

    sourceSetsContainer.create(defaultConfig.getName());
}
 
Example #10
Source File: BaseExtension.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Configures dex options.
 */
public void dexOptions(Action<DexOptions> action) {
    checkWritability();
    action.execute(dexOptions);
}
 
Example #11
Source File: BaseExtension.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public DexOptions getDexOptions() {
    return dexOptions;
}
 
Example #12
Source File: AndroidConfigAdaptor.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
public DexOptions getDexOptions() {
    return model.getDexOptions();
}
 
Example #13
Source File: AndroidConfig.java    From javaide with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Dex options.
 */
DexOptions getDexOptions();
 
Example #14
Source File: AndroidConfig.java    From javaide with GNU General Public License v3.0 votes vote down vote up
/**
 * Dex options.
 */

DexOptions getDexOptions();
 
Example #15
Source File: AndroidConfig.java    From javaide with GNU General Public License v3.0 votes vote down vote up
void setDexOptions(DexOptions dexOptions);