1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

First try at running under Java 9.

This commit is contained in:
Erik C. Thauvin 2017-10-31 21:44:57 -07:00
parent 86e39cbb58
commit c99a9eb6cd
4 changed files with 45 additions and 40 deletions

View file

@ -155,7 +155,7 @@ class KotlinCompiler @Inject constructor(
moduleName = projectName
destination = outputDir
classpath = classpathString
freeArgs = sourceFiles
freeArgs = sourceFiles.toMutableList()
friendPaths = friends
}
@ -178,10 +178,10 @@ class KotlinCompiler @Inject constructor(
"skip-runtime-version-check" -> args.skipRuntimeVersionCheck = true
"single-module" -> args.singleModule = true
"load-builtins-from-dependencies" -> args.loadBuiltInsFromDependencies = true
"coroutines=enable" -> args.coroutinesEnable = true
"coroutines=warn" -> args.coroutinesWarn = true
"coroutines=error" -> args.coroutinesError = true
// TODO fix
//"coroutines=enable" -> args.coroutinesEnable = true
//"coroutines=warn" -> args.coroutinesWarn = true
//"coroutines=error" -> args.coroutinesError = true
"no-inline" -> args.noInline = true
"multi-platform" -> args.multiPlatform = true
"no-check-impl" -> args.noCheckImpl = true
@ -214,7 +214,7 @@ class KotlinCompiler @Inject constructor(
+ " " + sourceFiles.joinToString(" "))
logk(2, " Additional kotlinc arguments: "
+ " -moduleName " + args.moduleName
+ " -friendPaths " + args.friendPaths.joinToString(";"))
+ " -friendPaths " + args.friendPaths?.joinToString(";"))
val collector = object : MessageCollector {
override fun clear() {
throw UnsupportedOperationException("not implemented")
@ -233,8 +233,7 @@ class KotlinCompiler @Inject constructor(
s
}
override fun report(severity: CompilerMessageSeverity,
message: String, location: CompilerMessageLocation) {
override fun report(severity: CompilerMessageSeverity, message: String, location: CompilerMessageLocation?) {
if (severity.isError) {
"Couldn't compile file: ${dump(location, message)}".let { fullMessage ->
throw KobaltException(fullMessage)

View file

@ -101,12 +101,12 @@ class BintrayApi @Inject constructor(val http: Http,
val pkgName = config.name ?: project.name
val execute = service.getPackage(org ?: username!!, pkgName).execute()
if (execute.errorBody()?.string()?.contains("'$pkgName' was not found") ?: false) {
if (execute.errorBody()?.string()?.contains("'$pkgName' was not found") == true) {
warn("Package does not exist on bintray. Creating now.")
val result = service.createPackage(org ?: username!!, buildPackageInfo(project, config))
.execute()
if (result.errorBody() != null) {
throw KobaltException("Error while creating package:\n" + result.errorBody().string())
throw KobaltException("Error while creating package:\n" + result.errorBody())
}
}
}