protected String extractPackageNameFromAndroidManifest( File manifestFile ) { return new DefaultManifestParser( manifestFile ).getPackage(); }
import com.android.builder.DefaultManifestParser def manifestParser = new DefaultManifestParser() println manifestParser.getVersionName(android.sourceSets.main.manifest.srcFile)
public void manifestMergerV2() throws MojoExecutionException, MojoFailureException AndroidBuilder builder = new AndroidBuilder( project.toString(), "created by Android Maven Plugin", new DefaultProcessExecutor( logger ), new DefaultJavaProcessExecutor( logger ), builder.mergeManifestsForApplication(
public static DefaultDexOptions copyOf(DexOptions dexOptions) { DefaultDexOptions result = new DefaultDexOptions(); result.setPreDexLibraries(dexOptions.getPreDexLibraries()); result.setJumboMode(dexOptions.getJumboMode()); result.setDexInProcess(dexOptions.getDexInProcess()); result.setThreadCount(dexOptions.getThreadCount()); result.setJavaMaxHeapSize(dexOptions.getJavaMaxHeapSize()); result.setAdditionalParameters(dexOptions.getAdditionalParameters()); result.setMaxProcessCount(dexOptions.getMaxProcessCount()); result.setKeepRuntimeAnnotatedClasses( dexOptions.getKeepRuntimeAnnotatedClasses()); return result; }
/** * Returns the original application ID before any overrides from flavors. * If the variant is a test variant, then the application ID is the one coming from the * configuration of the tested variant, and this call is similar to {@link #getApplicationId()} * @return the original application ID */ @Nullable public String getOriginalApplicationId() { if (mType.isForTesting()) { return getApplicationId(); } return getPackageFromManifest(); }
@Override public List<File> call() throws Exception { return androidBuilder.getBootClasspath(); } });
public int getVersionCodeFromManifest() { return getManifestAttributeSupplier().getVersionCode(); }
@Nullable public String getVersionNameFromManifest() { return getManifestAttributeSupplier().getVersionName(); }
@Override public boolean isTestCoverageEnabled() { return testVariantConfig.isTestCoverageEnabled(); }
/** * Reads the split name from the manifest. */ @Nullable public String getSplitFromManifest() { return getManifestAttributeSupplier().getSplit(); }
@Nullable public String getTestedApplicationIdFromManifest(){ return getManifestAttributeSupplier().getTargetPackage(); }
@Nullable public String getTestLabelFromManifest(){ return getManifestAttributeSupplier().getTestLabel(); }
@Nullable public Boolean getFunctionalTestFromManifest(){ return getManifestAttributeSupplier().getFunctionalTest(); }
@Nullable public String getInstrumentationRunnerFromManifest(){ return getManifestAttributeSupplier().getInstrumentationRunner(); }
@Nullable public Boolean getHandleProfilingFromManifest(){ return getManifestAttributeSupplier().getHandleProfiling(); }
@SuppressWarnings({"UnusedParameters", "MethodMayBeStatic"}) public void setIncremental(boolean ignored) { mErrorReporter.handleSyncWarning( null, SyncIssue.TYPE_GENERIC, INCREMENTAL_IGNORED); }
/** * Returns the original application ID before any overrides from flavors. * If the variant is a test variant, then the application ID is the one coming from the * configuration of the tested variant, and this call is similar to {@link #getApplicationId()} * @return the original application ID */ @Nullable public String getOriginalApplicationId() { if (mType.isForTesting()) { return getApplicationId(); } return getPackageFromManifest(); }
final String packageName = new DefaultManifestParser( libManifestFile ).getPackage(); if ( rJavaAlreadyExists( packageName ) )
doLast { def manifestParser = new DefaultManifestParser() def manifestVersion = manifestParser.getVersionName(android.sourceSets.main.manifest.srcFile) }
@Override public boolean isTestCoverageEnabled() { return testVariantConfig.isTestCoverageEnabled(); }