public String getBuckName() { @Var RuleType ruleType = this; switch (this) { case KOTLIN_ANDROID_LIBRARY: case ANDROID_LIBRARY: ruleType = ANDROID_LIBRARY; break; case KOTLIN_ROBOLECTRIC_TEST: case ROBOLECTRIC_TEST: ruleType = ROBOLECTRIC_TEST; break; default: break; } return ruleType.name().toLowerCase(); } }
private static Pair<String, String> getBashCommandAndTransformDeps( AndroidAppTarget target, Map<String, String> options) { String transformClass = options.get(OPT_TRANSFORM_CLASS); String configFile = options.get(OPT_CONFIG_FILE); StringBuilder bashCmd = new StringBuilder(PREFIX); @Var String configFileRule = null; if (transformClass != null) { bashCmd.append("-Dokbuck.transformClass=").append(transformClass).append(" "); } if (configFile != null) { configFileRule = getTransformConfigRuleForFile( target.getProject(), target.getRootProject().file(configFile)); bashCmd.append("-Dokbuck.configFile=$(location ").append(configFileRule).append(") "); } bashCmd.append(SUFFIX); return Pair.of(bashCmd.toString(), configFileRule); }
.collect(Collectors.joining(",\n")); @Var String nameExpr = names.stream().map(name -> "\"" + name + "\"").collect(Collectors.joining(", "));
@Nullable Target getTargetForVariant(@Nullable String variant) { @Var Target result = null; ProjectType type = ProjectUtil.getType(project); switch (type) { case ANDROID_LIB: result = getTargets().get(variant); if (result == null) { throw new IllegalStateException( "No target found for " + project.getDisplayName() + " for variant " + variant); } break; case GROOVY_LIB: case JAVA_LIB: case KOTLIN_LIB: case SCALA_LIB: result = getTargets().values().iterator().next(); break; default: break; } return result; } }
@Nullable private Configuration getConfigurationFromVariant(@Nullable BaseVariant variant) { @Var Configuration configuration = null; if (isKapt) { configuration = getProject() .getConfigurations() .getByName("kapt" + StringUtils.capitalize(getBaseVariant().getName())); } else if (variant != null) { configuration = variant.getAnnotationProcessorConfiguration(); } return configuration; }
return null; @Var String appClass = null;
@Var boolean autoValueDependency = dependencySet
/** * Computes a hash code from attributes: {@code advice}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + advice.hashCode(); return h; }
/** * Computes a hash code from attributes: {@code host}, {@code port}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + host.hashCode(); h += (h << 5) + port; return h; }
/** * Computes a hash code from attributes: {@code loggerName}, {@code partialMessage}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + loggerName.hashCode(); h += (h << 5) + partialMessage.hashCode(); return h; }
/** * Computes a hash code from attributes: {@code message}, {@code throwable}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + message.hashCode(); h += (h << 5) + Objects.hashCode(throwable); return h; }
/** * Computes a hash code from attributes: {@code className}, {@code codeSource}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + className.hashCode(); h += (h << 5) + Objects.hashCode(codeSource); return h; }
/** * Computes a hash code from attributes: {@code directory}, {@code jarFile}, {@code jarFileInsideJarFile}, {@code directoryInsideJarFile}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + Objects.hashCode(directory); h += (h << 5) + Objects.hashCode(jarFile); h += (h << 5) + Objects.hashCode(jarFileInsideJarFile); h += (h << 5) + Objects.hashCode(directoryInsideJarFile); return h; }
@Var boolean hasKotlinExtension; try { AndroidExtensionsExtension androidExtensions =
/** * Computes a hash code from attributes: {@code object}, {@code name}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + object.hashCode(); h += (h << 5) + name.hashCode(); return h; }
/** * Computes a hash code from attributes: {@code defaultThresholdNanos}, {@code thresholdNanos}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + Objects.hashCode(defaultThresholdNanos); h += (h << 5) + thresholdNanos.hashCode(); return h; }
/** * Computes a hash code from attributes: {@code type}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + type.hashCode(); return h; }
/** * Computes a hash code from attributes: {@code name}, {@code parameterTypes}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + name.hashCode(); h += (h << 5) + parameterTypes.hashCode(); return h; }
/** * Computes a hash code from attributes: {@code stackTrace}, {@code framesInCommonWithEnclosing}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + stackTrace.hashCode(); h += (h << 5) + framesInCommonWithEnclosing; return h; }
/** * Computes a hash code from attributes: {@code name}, {@code parameterTypes}. * @return hashCode value */ @Override public int hashCode() { @Var int h = 5381; h += (h << 5) + name.hashCode(); h += (h << 5) + parameterTypes.hashCode(); return h; }