Skip to content

Commit

Permalink
Remove ability for Turbine to fall back to old implementation (#255)
Browse files Browse the repository at this point in the history
Formally deprecates old unused tasks that Turbine does for us now.
  • Loading branch information
niloc132 authored Feb 29, 2024
1 parent 7809eb4 commit 4b64140
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
import java.nio.file.Path;

/**
* TODO implement using the ijar tool or the equivelent
*
* For now, this is just the same output, straight passthru
* Along with {@link JavacTask}, no longer used unless specifically requested by the user.
* See {@link TurbineTask} for the more efficient replacement.
* <p>
* To re-enable this, set task type stripped_bytecode_headers to "original-bytecode".
*/
@Deprecated
@AutoService(TaskFactory.class)
public class IJarTask extends TaskFactory {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@
import java.util.zip.ZipInputStream;

@AutoService(TaskFactory.class)
public class TurbineTask extends JavacTask {
public class TurbineTask extends TaskFactory {

public static final PathMatcher JAVA_SOURCES = withSuffix(".java");
public static final PathMatcher JAVA_BYTECODE = withSuffix(".class");

@Override
public String getOutputType() {
Expand All @@ -57,11 +58,6 @@ public String getVersion() {

@Override
public Task resolve(Project project, Config config) {
int version = SourceVersion.latestSupported().ordinal();
if(version == 8) {
return super.resolve(project, config);
}

// emits only stripped bytecode, so we're not worried about anything other than .java files to compile and .class on the classpath
Input ownSources = input(project, OutputTypes.STRIPPED_SOURCES).filter(JAVA_SOURCES);

Expand Down

0 comments on commit 4b64140

Please sign in to comment.