mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Remove public.
This commit is contained in:
parent
62b193f378
commit
48bbdfd1ff
13 changed files with 21 additions and 31 deletions
|
@ -6,7 +6,7 @@ import com.beust.kobalt.api.annotation.Directive
|
|||
import com.beust.kobalt.internal.JvmCompilerPlugin
|
||||
|
||||
@Directive
|
||||
public fun project(vararg projects: Project, init: Project.() -> Unit): Project {
|
||||
fun project(vararg projects: Project, init: Project.() -> Unit): Project {
|
||||
return Project("").apply {
|
||||
init()
|
||||
(Kobalt.findPlugin(JvmCompilerPlugin.PLUGIN_NAME) as JvmCompilerPlugin)
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.net.URLClassLoader
|
|||
* Will probably be made obsolete by making the wrapper a standalone module instead of
|
||||
* being inside Kobalt itself.
|
||||
*/
|
||||
public class ParentLastClassLoader(val classpath: List<URL>)
|
||||
class ParentLastClassLoader(val classpath: List<URL>)
|
||||
: ClassLoader(Thread.currentThread().contextClassLoader) {
|
||||
private val childClassLoader: ChildURLClassLoader
|
||||
|
||||
|
@ -22,7 +22,7 @@ public class ParentLastClassLoader(val classpath: List<URL>)
|
|||
* This class makes it possible to call findClass on a classloader
|
||||
*/
|
||||
private class FindClassClassLoader(parent: ClassLoader) : ClassLoader(parent) {
|
||||
override public fun findClass(name: String) = super.findClass(name)
|
||||
override fun findClass(name: String) = super.findClass(name)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -32,7 +32,7 @@ public class ParentLastClassLoader(val classpath: List<URL>)
|
|||
private class ChildURLClassLoader(urls: Array<URL>, val realParent: FindClassClassLoader)
|
||||
: URLClassLoader(urls, null) {
|
||||
|
||||
override public fun findClass(name: String) : Class<*> {
|
||||
override fun findClass(name: String) : Class<*> {
|
||||
try {
|
||||
// first try to use the URLClassLoader findClass
|
||||
return super.findClass(name)
|
||||
|
@ -43,7 +43,7 @@ public class ParentLastClassLoader(val classpath: List<URL>)
|
|||
}
|
||||
}
|
||||
|
||||
override public @Synchronized fun loadClass(name: String, resolve: Boolean) : Class<*> {
|
||||
override @Synchronized fun loadClass(name: String, resolve: Boolean) : Class<*> {
|
||||
try {
|
||||
// first we try to find a class inside the child classloader
|
||||
return childClassLoader.findClass(name)
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.beust.kobalt.maven
|
|||
import java.util.concurrent.Future
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
public class CompletedFuture<T>(val value: T) : Future<T> {
|
||||
class CompletedFuture<T>(val value: T) : Future<T> {
|
||||
override fun cancel(mayInterruptIfRunning: Boolean) = true
|
||||
override fun get(): T = value
|
||||
override fun get(timeout: Long, unit: TimeUnit): T = value
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.io.File
|
|||
import java.io.InputStreamReader
|
||||
|
||||
@Singleton
|
||||
public class Gpg {
|
||||
class Gpg {
|
||||
val COMMANDS = listOf("gpg", "gpg2")
|
||||
|
||||
fun findGpgCommand() : String? {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.beust.kobalt.maven
|
||||
|
||||
open public class LocalDep(override val mavenId: MavenId, open val localRepo: LocalRepo)
|
||||
open class LocalDep(override val mavenId: MavenId, open val localRepo: LocalRepo)
|
||||
: SimpleDep(mavenId) {
|
||||
|
||||
fun toAbsoluteJarFilePath(v: String) = localRepo.toFullPath(toJarFile(v))
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.util.zip.ZipEntry
|
|||
import java.util.zip.ZipFile
|
||||
import java.util.zip.ZipOutputStream
|
||||
|
||||
public class JarUtils {
|
||||
class JarUtils {
|
||||
companion object {
|
||||
val DEFAULT_HANDLER: (Exception) -> Unit = { ex: Exception ->
|
||||
// Ignore duplicate entry exceptions
|
||||
|
@ -150,7 +150,7 @@ class IncludedFile(val fromOriginal: From, val toOriginal: To, val specs: List<I
|
|||
val from: String get() = fromOriginal.path.replace("\\", "/")
|
||||
fun to(s: String) = File(if (toOriginal.isCurrentDir()) s else KFiles.joinDir(to, s))
|
||||
val to: String get() = toOriginal.path.replace("\\", "/")
|
||||
override public fun toString() = toString("IncludedFile",
|
||||
override fun toString() = toString("IncludedFile",
|
||||
"files - ", specs.map { it.toString() },
|
||||
"from", from,
|
||||
"to", to)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.beust.kobalt.misc
|
||||
|
||||
public data class Node<T>(val value: T) {
|
||||
data class Node<T>(val value: T) {
|
||||
val children = arrayListOf<Node<T>>()
|
||||
var parent: Node<T>? = null
|
||||
|
||||
public fun addChildren(values: List<Node<T>>) {
|
||||
fun addChildren(values: List<Node<T>>) {
|
||||
values.forEach {
|
||||
it.parent = this
|
||||
children.add(it)
|
||||
|
@ -15,12 +15,12 @@ public data class Node<T>(val value: T) {
|
|||
println(s)
|
||||
}
|
||||
|
||||
public fun dump(r: T, children: List<Node<T>>, indent: Int) {
|
||||
fun dump(r: T, children: List<Node<T>>, indent: Int) {
|
||||
p(" ".repeat(indent) + r)
|
||||
children.forEach { dump(it.value, it.children, indent + 2) }
|
||||
}
|
||||
|
||||
public fun dump(indent: Int = 0) {
|
||||
fun dump(indent: Int = 0) {
|
||||
dump(value, children, indent)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue