本文整理了Java中org.gradle.api.AntBuilder.invokeMethod()
方法的一些代码示例,展示了AntBuilder.invokeMethod()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AntBuilder.invokeMethod()
方法的具体详情如下:
包路径:org.gradle.api.AntBuilder
类名称:AntBuilder
方法名:invokeMethod
暂无
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-node
private File _download(String url, File destinationFile)
throws IOException {
String protocol = url.substring(0, url.indexOf(':'));
String proxyPassword = System.getProperty(protocol + ".proxyPassword");
String proxyUser = System.getProperty(protocol + ".proxyUser");
if (Validator.isNotNull(proxyPassword) &&
Validator.isNotNull(proxyUser)) {
Project project = getProject();
String nonProxyHosts = System.getProperty(
protocol + ".nonProxyHosts");
String proxyHost = System.getProperty(protocol + ".proxyHost");
String proxyPort = System.getProperty(protocol + ".proxyPort");
AntBuilder antBuilder = project.getAnt();
Map<String, String> args = new HashMap<>();
args.put("nonproxyhosts", nonProxyHosts);
args.put("proxyhost", proxyHost);
args.put("proxypassword", proxyPassword);
args.put("proxyport", proxyPort);
args.put("proxyuser", proxyUser);
antBuilder.invokeMethod("setproxy", args);
}
return FileUtil.get(getProject(), url, destinationFile);
}
代码示例来源:origin: com.liferay/com.liferay.gradle.plugins.node
private File _download(String url, File destinationFile)
throws IOException {
String protocol = url.substring(0, url.indexOf(':'));
String proxyPassword = System.getProperty(protocol + ".proxyPassword");
String proxyUser = System.getProperty(protocol + ".proxyUser");
if (Validator.isNotNull(proxyPassword) &&
Validator.isNotNull(proxyUser)) {
Project project = getProject();
String nonProxyHosts = System.getProperty(
protocol + ".nonProxyHosts");
String proxyHost = System.getProperty(protocol + ".proxyHost");
String proxyPort = System.getProperty(protocol + ".proxyPort");
AntBuilder antBuilder = project.getAnt();
Map<String, String> args = new HashMap<>();
args.put("nonproxyhosts", nonProxyHosts);
args.put("proxyhost", proxyHost);
args.put("proxypassword", proxyPassword);
args.put("proxyport", proxyPort);
args.put("proxyuser", proxyUser);
antBuilder.invokeMethod("setproxy", args);
}
return FileUtil.get(getProject(), url, destinationFile);
}
代码示例来源:origin: MinecraftForge/ForgeGradle
public String getBuildNumber() throws IOException
{
if (this.buildNumber == null)
{
AntBuilder ant = getProject().getAnt();
File buildNumberFile = new File(this.getTemporaryDir(), "build.number");
BuildNumber buildNumber = (BuildNumber)ant.invokeMethod("buildnumber");
buildNumber.setFile(buildNumberFile);
buildNumber.execute();
Properties props = new Properties();
props.load(Files.newReader(buildNumberFile, Charsets.ISO_8859_1));
this.buildNumber = props.getProperty("build.number");
}
return this.buildNumber;
}
}
代码示例来源:origin: MinecraftForge/ForgeGradle
@TaskAction
public void doTask() throws IOException
{
final Map<String, Entry<byte[], Long>> ignoredStuff = Maps.newHashMap();
File input = getInputFile();
File toSign = new File(getTemporaryDir(), input.getName() + ".unsigned.tmp");
File signed = new File(getTemporaryDir(), input.getName() + ".signed.tmp");
File output = getOutputFile();
// load in input jar, and create temp jar
processInputJar(input, toSign, ignoredStuff);
// SIGN!
Map<String, Object> map = Maps.newHashMap();
map.put("alias", getAlias());
map.put("storePass", getStorePass());
map.put("jar", toSign.getAbsolutePath());
map.put("signedJar", signed.getAbsolutePath());
if (!Strings.isNullOrEmpty(getKeyPass()))
map.put("keypass", getKeyPass());
if (!Strings.isNullOrEmpty(getKeyStore()))
map.put("keyStore", getKeyStore());
getProject().getAnt().invokeMethod("signjar", map);
// write out
writeOutputJar(signed, output, ignoredStuff);
}
代码示例来源:origin: MinecraftForge/ForgeGradle
getExtPath();
ant.invokeMethod("javac",
ImmutableMap.builder()
.put("srcDir", tempSrc.getCanonicalPath())
代码示例来源:origin: MinecraftForge/ForgeGradle
ant.invokeMethod("javac", ImmutableMap.builder()
.put("srcDir", resourceDir.getCanonicalPath())
.put("destDir", compiled.getCanonicalPath())
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-tlddoc-builder
args.put("publicId", publicId);
antBuilder.invokeMethod("dtd", args);
args.put("namespace", namespace);
antBuilder.invokeMethod("schema", args);
代码示例来源:origin: ibinti/bugvm
getAnt().invokeMethod("delete", new java.util.HashMap<String, Object>() {
getAnt().invokeMethod("chmod", new java.util.HashMap<String, Object>() {
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-tlddoc-builder
antBuilder.invokeMethod("schemavalidate", new Object[] {args, closure});
代码示例来源:origin: gradle.plugin.mpern.sap.commerce/commerce-gradle-plugin
args.put("format", "MD5SUM");
args.put("fileext", ".MD5");
p.getAnt().invokeMethod("checksum", args);
Path resolve = zipPackage.getDestinationDir().toPath().resolve(zipPackage.getArchiveName() + ".MD5");
Path target = zipPackage.getDestinationDir().toPath().resolve(zipPackage.getBaseName() + ".md5");
内容来源于网络,如有侵权,请联系作者删除!