Skip to content

Commit 9a9d173

Browse files
committed
Remove ability for Turbine to fall back to old implementation
Formally deprecates old unused tasks that Turbine does for us now.
1 parent 7809eb4 commit 9a9d173

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

j2cl-tasks/src/main/java/com/vertispan/j2cl/build/provided/IJarTask.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@
2222
import java.nio.file.Path;
2323

2424
/**
25-
* TODO implement using the ijar tool or the equivelent
26-
*
27-
* For now, this is just the same output, straight passthru
25+
* Along with {@link JavacTask}, no longer used unless specifically requested by the user.
26+
* See {@link TurbineTask} for the more efficient replacement.
27+
* <p>
28+
* To re-enable this, set task type stripped_bytecode_headers to "original-bytecode".
2829
*/
30+
@Deprecated
2931
@AutoService(TaskFactory.class)
3032
public class IJarTask extends TaskFactory {
3133
@Override

j2cl-tasks/src/main/java/com/vertispan/j2cl/build/provided/JavacTask.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
import java.util.stream.Collectors;
3030
import java.util.stream.Stream;
3131

32+
/**
33+
* Along with {@link IJarTask}, no longer used unless specifically requested by the user.
34+
* See {@link TurbineTask} for the more efficient replacement. This class was an intermediate
35+
* task, before IJarTask, re-enable that class through configuration to use this.
36+
*/
37+
@Deprecated
3238
@AutoService(TaskFactory.class)
3339
public class JavacTask extends TaskFactory {
3440

j2cl-tasks/src/main/java/com/vertispan/j2cl/build/provided/TurbineTask.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@
3636
import java.util.zip.ZipInputStream;
3737

3838
@AutoService(TaskFactory.class)
39-
public class TurbineTask extends JavacTask {
39+
public class TurbineTask extends TaskFactory {
4040

4141
public static final PathMatcher JAVA_SOURCES = withSuffix(".java");
42+
public static final PathMatcher JAVA_BYTECODE = withSuffix(".class");
4243

4344
@Override
4445
public String getOutputType() {
@@ -57,11 +58,6 @@ public String getVersion() {
5758

5859
@Override
5960
public Task resolve(Project project, Config config) {
60-
int version = SourceVersion.latestSupported().ordinal();
61-
if(version == 8) {
62-
return super.resolve(project, config);
63-
}
64-
6561
// emits only stripped bytecode, so we're not worried about anything other than .java files to compile and .class on the classpath
6662
Input ownSources = input(project, OutputTypes.STRIPPED_SOURCES).filter(JAVA_SOURCES);
6763

0 commit comments

Comments
 (0)