public ThinPexGenerator( Project project, List<String> pexOptions, EntryPointTemplateProvider templateProvider, Map<String, String> extraProperties) { super(project, pexOptions, templateProvider, extraProperties); logger = Logging.getLogger(ThinPexGenerator.class); }
public ThinPexGenerator( Project project, List<String> pexOptions, EntryPointTemplateProvider templateProvider, Map<String, String> extraProperties) { super(project, pexOptions, templateProvider, extraProperties); logger = Logging.getLogger(ThinPexGenerator.class); }
@Override public Logger getLogger() { return Logging.getLogger(GnagPlugin.class); }
public DefaultBuildOperationLoggerFactory() { this(Logging.getLogger(DefaultBuildOperationLoggerFactory.class)); }
@Override public Logger getLogger() { return Logging.getLogger(GnagPlugin.class); }
/** * Create a new plugin */ public AbstractProjectConfigPlugin() { this.logger = Logging.getLogger(getClass()); }
/** * Create a new plugin */ public AbstractProjectConfigPlugin() { this.logger = Logging.getLogger(getClass()); }
/** * Create a new workspace plugin */ @Inject public WorkspacePlugin() { this.logger = Logging.getLogger(getClass()); }
private static void invalidNdkWarning(String message, File ndkDir) { Logging.getLogger(NdkHandler.class).warn( "{}\n" + "If you are using NDK, verify the ndk.dir is set to a valid NDK " + "directory. It is currently set to {}.\n" + "If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME " + "or local.properties to remove this warning.\n", message, ndkDir.getAbsolutePath()); }
public DependencyManager(Project project, ExtraModelInfo extraModelInfo) { this.project = project; this.extraModelInfo = extraModelInfo; logger = new LoggerWrapper(Logging.getLogger(DependencyManager.class)); }
public static Logger getLogger(Class<?> clazz) { return new LoggerImpl(Logging.getLogger(clazz)); }
@SuppressWarnings("MethodMayBeStatic") @Deprecated public void setVersion(String version) { Logging.getLogger(JacocoOptions.class).warn("" + "It is no longer possible to set the Jacoco version in the " + "jacoco {} block.\n" + "To update the version of Jacoco without updating the android plugin,\n" + "add a buildscript dependency on a newer version, for example: " + "buildscript{" + " dependencies {\n" + " classpath \"org.jacoco:org.jacoco.core:0.7.5.201505241946\"" + " }" + "}"); }
public TaskManager( Project project, AndroidBuilder androidBuilder, AndroidConfig extension, SdkHandler sdkHandler, DependencyManager dependencyManager, ToolingModelBuilderRegistry toolingRegistry) { this.project = project; this.androidBuilder = androidBuilder; this.sdkHandler = sdkHandler; this.extension = extension; this.toolingRegistry = toolingRegistry; this.dependencyManager = dependencyManager; logger = Logging.getLogger(this.getClass()); globalScope = new GlobalScope( project, androidBuilder, extension, sdkHandler, toolingRegistry); }
private void loadFromDocument(@NonNull Document document) { Element instantRun = document.getDocumentElement(); if (!(Version.ANDROID_GRADLE_PLUGIN_VERSION.equals( instantRun.getAttribute(ATTR_PLUGIN_VERSION)))) { // Don't load if the plugin version has changed. Logging.getLogger(InstantRunBuildContext.class) .quiet("Instant Run: Android plugin version has changed."); setVerifierStatus(InstantRunVerifierStatus.INITIAL_BUILD); return; } String tokenString = instantRun.getAttribute(ATTR_TOKEN); if (!Strings.isNullOrEmpty(tokenString)) { token.set(Long.parseLong(tokenString)); } Build lastBuild = Build.fromXml(instantRun); previousBuilds.put(lastBuild.buildId, lastBuild); NodeList buildNodes = instantRun.getChildNodes(); for (int i = 0; i < buildNodes.getLength(); i++) { Node buildNode = buildNodes.item(i); if (buildNode.getNodeName().equals(TAG_BUILD)) { Build build = Build.fromXml(buildNode); previousBuilds.put(build.buildId, build); } } }
private Set<String> callDx(File allClassesJarFile, File jarOfRoots) throws ProcessException { EnumSet<AndroidBuilder.MainDexListOption> mainDexListOptions = EnumSet.noneOf(AndroidBuilder.MainDexListOption.class); if (!keepRuntimeAnnotatedClasses) { mainDexListOptions.add( AndroidBuilder.MainDexListOption.DISABLE_ANNOTATION_RESOLUTION_WORKAROUND); Logging.getLogger(MultiDexTransform.class).warn( "Not including classes with runtime retention annotations in the main dex.\n" + "This can cause issues with reflection in older platforms."); } return variantScope.getGlobalScope().getAndroidBuilder().createMainDexList( allClassesJarFile, jarOfRoots, mainDexListOptions); } }
public TransformManager( @NonNull AndroidTaskRegistry taskRegistry, @NonNull ErrorReporter errorReporter, @NonNull Recorder recorder) { this.taskRegistry = taskRegistry; this.errorReporter = errorReporter; this.recorder = recorder; this.logger = Logging.getLogger(TransformManager.class); }
@NonNull public static LoggerWrapper getLogger(@NonNull Class<?> klass) { return new LoggerWrapper(Logging.getLogger(klass)); }
public DependencyManager( @NonNull Project project, @NonNull ExtraModelInfo extraModelInfo, @NonNull SdkHandler sdkHandler) { this.project = project; this.extraModelInfo = extraModelInfo; this.sdkHandler = sdkHandler; logger = new LoggerWrapper(Logging.getLogger(DependencyManager.class)); }
/** * Retrieve the newest supported version if it is not the specified version is not supported. * * An older NDK may not support the specified compiledSdkVersion. In that case, determine what * is the newest supported version and modify compileSdkVersion. */ @Override @Nullable public String findLatestPlatformVersion(@NonNull String targetPlatformString) { AndroidVersion androidVersion = AndroidTargetHash.getVersionFromHash(targetPlatformString); int targetVersion; if (androidVersion == null) { Logging.getLogger(this.getClass()).warn( "Unable to parse NDK platform version. Try to find the latest instead."); targetVersion = Integer.MAX_VALUE; } else { targetVersion = androidVersion.getFeatureLevel(); } targetVersion = findTargetPlatformVersionOrLower(targetVersion); if (targetVersion == 0) { return null; } return "android-" + targetVersion; }
public BaseVariantData( @NonNull AndroidConfig androidConfig, @NonNull TaskManager taskManager, @NonNull GradleVariantConfiguration variantConfiguration) { this.androidConfig = androidConfig; this.variantConfiguration = variantConfiguration; this.taskManager = taskManager; // eventually, this will require a more open ended comparison. mSplitHandlingPolicy = androidConfig.getGeneratePureSplits() && variantConfiguration.getMinSdkVersion().getApiLevel() >= 21 ? SplitHandlingPolicy.RELEASE_21_AND_AFTER_POLICY : SplitHandlingPolicy.PRE_21_POLICY; // warn the user in case we are forced to ignore the generatePureSplits flag. if (androidConfig.getGeneratePureSplits() && mSplitHandlingPolicy != SplitHandlingPolicy.RELEASE_21_AND_AFTER_POLICY) { Logging.getLogger(BaseVariantData.class).warn( String.format("Variant %s, MinSdkVersion %s is too low (<21) " + "to support pure splits, reverting to full APKs", variantConfiguration.getFullName(), variantConfiguration.getMinSdkVersion().getApiLevel())); } scope = new VariantScope(taskManager.getGlobalScope(), this); taskManager.configureScopeForNdk(scope); }