Removed kapt options (failed)
This commit is contained in:
parent
8769bf1884
commit
d8156fe871
4 changed files with 5 additions and 383 deletions
|
@ -46,7 +46,6 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
private File buildMainDirectory_;
|
||||
private File buildTestDirectory_;
|
||||
private CompileKotlinOptions compileOptions_;
|
||||
private KaptOptions kaptOptions_;
|
||||
private BaseProject project_;
|
||||
|
||||
/**
|
||||
|
@ -215,6 +214,7 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
executeCreateBuildDirectories();
|
||||
executeBuildMainSources();
|
||||
executeBuildTestSources();
|
||||
|
||||
if (!silent()) {
|
||||
System.out.println("Kotlin compilation finished successfully.");
|
||||
}
|
||||
|
@ -260,8 +260,7 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
|
||||
// friend-path
|
||||
if (friendPaths != null) {
|
||||
args.add("-Xfriend-paths");
|
||||
args.add(friendPaths.getAbsolutePath());
|
||||
args.add("-Xfriend-paths=" + friendPaths.getAbsolutePath());
|
||||
}
|
||||
|
||||
// options
|
||||
|
@ -269,21 +268,6 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
args.addAll(compileOptions_.args());
|
||||
}
|
||||
|
||||
// kapt plugin & options
|
||||
if (kaptOptions_ != null) {
|
||||
var kaptJar = getJarList(project_.libBldDirectory(), "^.*kotlin-annotation-processing.*\\.jar$");
|
||||
if (kaptJar.size() == 1) {
|
||||
args.add("-Xplugin=" + kaptJar.get(0));
|
||||
kaptOptions_.args().forEach(a -> {
|
||||
args.add("-P");
|
||||
args.add(a);
|
||||
});
|
||||
} else if (LOGGER.isLoggable(Level.WARNING)) {
|
||||
LOGGER.warning("Could not locate the Kotlin annotation processing JAR in:" +
|
||||
project_.libBldDirectory().getAbsolutePath());
|
||||
}
|
||||
}
|
||||
|
||||
// sources
|
||||
sources.forEach(f -> args.add(f.getAbsolutePath()));
|
||||
|
||||
|
@ -305,7 +289,8 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
executeBuildSources(
|
||||
compileTestClasspath(),
|
||||
sources(testSourceFiles(), testSourceDirectories()),
|
||||
buildTestDirectory(), buildMainDirectory());
|
||||
buildTestDirectory(),
|
||||
buildMainDirectory());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -345,17 +330,6 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
.testSourceFiles(getKotlinFileList(new File(project.srcTestDirectory(), "kotlin")));
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides the annotation processor ({@code kapt} options.
|
||||
*
|
||||
* @param options the {@code kapt} options
|
||||
* @return this class instance
|
||||
*/
|
||||
public CompileKotlinOperation kaptOptions(KaptOptions options) {
|
||||
kaptOptions_ = options;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides main source directories that should be compiled.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue