org.gradle.jvm.internal.toolchain.JavaToolChainInternal Java Examples
The following examples show how to use
org.gradle.jvm.internal.toolchain.JavaToolChainInternal.
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: Javadoc.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private void executeExternalJavadoc() { JavadocSpec spec = new JavadocSpec(); spec.setExecutable(executable); spec.setOptions(options); spec.setIgnoreFailures(!failOnError); spec.setWorkingDir(getProject().getProjectDir()); spec.setOptionsFile(getOptionsFile()); Compiler<JavadocSpec> generator = ((JavaToolChainInternal) getToolChain()).select(null).newCompiler(spec); generator.execute(spec); }
Example #2
Source File: ResolveJavadocLinks.java From gradle-plugins with MIT License | 5 votes |
private String getJavaSeLink() { JavaVersion javaVersion = JavaVersion.current(); JavaToolChain toolChain = javadoc.getToolChain(); if (toolChain instanceof JavaToolChainInternal) { javaVersion = ((JavaToolChainInternal) toolChain).getJavaVersion(); } if (javaVersion.isJava11Compatible()) { return "https://docs.oracle.com/en/java/javase/" + javaVersion.getMajorVersion() + "/docs/api/"; } else { return "https://docs.oracle.com/javase/" + javaVersion.getMajorVersion() + "/docs/api/"; } }
Example #3
Source File: ResolveJavadocLinks.java From gradle-plugins with MIT License | 5 votes |
private String getJavaSeLink() { JavaVersion javaVersion = JavaVersion.current(); JavaToolChain toolChain = javadoc.getToolChain(); if (toolChain instanceof JavaToolChainInternal) { javaVersion = ((JavaToolChainInternal) toolChain).getJavaVersion(); } if (javaVersion.isJava11Compatible()) { return "https://docs.oracle.com/en/java/javase/" + javaVersion.getMajorVersion() + "/docs/api/"; } else { return "https://docs.oracle.com/javase/" + javaVersion.getMajorVersion() + "/docs/api/"; } }
Example #4
Source File: Javadoc.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private void executeExternalJavadoc() { JavadocSpec spec = new JavadocSpec(); spec.setExecutable(executable); spec.setOptions(options); spec.setIgnoreFailures(!failOnError); spec.setWorkingDir(getProject().getProjectDir()); spec.setOptionsFile(getOptionsFile()); Compiler<JavadocSpec> generator = ((JavaToolChainInternal) getToolChain()).select(null).newCompiler(spec); generator.execute(spec); }
Example #5
Source File: DefaultJavaToolChainRegistry.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultJavaToolChainRegistry(JavaToolChainInternal toolChain) { this.toolChain = toolChain; }
Example #6
Source File: JvmComponentPlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
@Model JavaToolChainRegistry javaToolChain(ServiceRegistry serviceRegistry) { JavaToolChainInternal toolChain = serviceRegistry.get(JavaToolChainInternal.class); return new DefaultJavaToolChainRegistry(toolChain); }
Example #7
Source File: JvmComponentPlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public void execute(JarBinarySpec jarBinarySpec) { JavaToolChainInternal toolChain = (JavaToolChainInternal) jarBinarySpec.getToolChain(); boolean canBuild = toolChain.select(jarBinarySpec.getTargetPlatform()).isAvailable(); ((JarBinarySpecInternal) jarBinarySpec).setBuildable(canBuild); }
Example #8
Source File: JavaCompile.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
private CleaningJavaCompiler createCompiler(JavaCompileSpec spec) { // TODO:DAZ Supply the target platform to the task, using the compatibility flags as overrides // Or maybe split the legacy compile task from the new one Compiler<JavaCompileSpec> javaCompiler = ((JavaToolChainInternal) getToolChain()).select(getPlatform()).newCompiler(spec); return new CleaningJavaCompiler(javaCompiler, getAntBuilderFactory(), getOutputs()); }
Example #9
Source File: JavaToolChainServiceRegistry.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
JavaToolChainInternal createJavaToolChain(JavaCompilerFactory compilerFactory, ExecActionFactory execActionFactory) { return new DefaultJavaToolChain(compilerFactory, execActionFactory); }
Example #10
Source File: JavaCompile.java From javaide with GNU General Public License v3.0 | 4 votes |
private CleaningJavaCompiler createCompiler(JavaCompileSpec spec) { Compiler<JavaCompileSpec> javaCompiler = CompilerUtil.castCompiler(((JavaToolChainInternal) getToolChain()).select(getPlatform()).newCompiler(spec.getClass())); return new CleaningJavaCompiler(javaCompiler, getOutputs()); }
Example #11
Source File: DefaultJavaToolChainRegistry.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultJavaToolChainRegistry(JavaToolChainInternal toolChain) { this.toolChain = toolChain; }
Example #12
Source File: JvmComponentPlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
@Model JavaToolChainRegistry javaToolChain(ServiceRegistry serviceRegistry) { JavaToolChainInternal toolChain = serviceRegistry.get(JavaToolChainInternal.class); return new DefaultJavaToolChainRegistry(toolChain); }
Example #13
Source File: JvmComponentPlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public void execute(JarBinarySpec jarBinarySpec) { JavaToolChainInternal toolChain = (JavaToolChainInternal) jarBinarySpec.getToolChain(); boolean canBuild = toolChain.select(jarBinarySpec.getTargetPlatform()).isAvailable(); ((JarBinarySpecInternal) jarBinarySpec).setBuildable(canBuild); }
Example #14
Source File: JavaCompile.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
private CleaningJavaCompiler createCompiler(JavaCompileSpec spec) { // TODO:DAZ Supply the target platform to the task, using the compatibility flags as overrides // Or maybe split the legacy compile task from the new one Compiler<JavaCompileSpec> javaCompiler = ((JavaToolChainInternal) getToolChain()).select(getPlatform()).newCompiler(spec); return new CleaningJavaCompiler(javaCompiler, getAntBuilderFactory(), getOutputs()); }
Example #15
Source File: JavaToolChainServiceRegistry.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
JavaToolChainInternal createJavaToolChain(JavaCompilerFactory compilerFactory, ExecActionFactory execActionFactory) { return new DefaultJavaToolChain(compilerFactory, execActionFactory); }