1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-28 09:08:13 -07:00

Delete JavaProject/KotlinProject.

This commit is contained in:
Cedric Beust 2016-02-07 16:59:03 -08:00
parent 914f2527a6
commit 403a3eccf4
6 changed files with 12 additions and 73 deletions

View file

@ -74,8 +74,8 @@ class JavaPlugin @Inject constructor(val javaCompiler: JavaCompiler)
}
@Directive
public fun javaProject(vararg projects: Project, init: JavaProject.() -> Unit): JavaProject {
return JavaProject().apply {
public fun javaProject(vararg projects: Project, init: Project.() -> Unit): Project {
return Project().apply {
warn("javaProject{} is deprecated, please use project{}")
init()
(Kobalt.findPlugin(JvmCompilerPlugin.PLUGIN_NAME) as JvmCompilerPlugin)

View file

@ -1,31 +0,0 @@
package com.beust.kobalt.plugin.java
import com.beust.kobalt.api.Dependencies
import com.beust.kobalt.api.Project
import com.beust.kobalt.api.annotation.Directive
import com.beust.kobalt.misc.toString
public class JavaProject(
@Directive
override var name: String = "",
@Directive
override var version: String? = null,
/** The absolute directory location of this project */
@Directive
override var directory: String = ".",
/** The build directory, relative to the project directory */
@Directive
override var buildDirectory: String = "kobaltBuild",
@Directive
override var group: String? = null,
@Directive
override var artifactId: String? = null,
@Directive
override var dependencies: Dependencies? = null,
@Directive
override var packaging: String? = null)
: Project(name, version, directory, buildDirectory, group, artifactId, packaging, dependencies, ".java") {
override public fun toString() = toString("JavaProject", "name", name)
}

View file

@ -140,8 +140,8 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors)
* @param project: the list of projects that need to be built before this one.
*/
@Directive
fun kotlinProject(vararg projects: Project, init: KotlinProject.() -> Unit): KotlinProject {
return KotlinProject().apply {
fun kotlinProject(vararg projects: Project, init: Project.() -> Unit): Project {
return Project().apply {
warn("kotlinProject{} is deprecated, please use project{}")
init()
(Kobalt.findPlugin(JvmCompilerPlugin.PLUGIN_NAME) as JvmCompilerPlugin)

View file

@ -1,30 +0,0 @@
package com.beust.kobalt.plugin.kotlin
import com.beust.kobalt.api.Dependencies
import com.beust.kobalt.api.Project
import com.beust.kobalt.api.annotation.Directive
import com.beust.kobalt.misc.toString
public class KotlinProject(
@Directive
override var name: String = "",
@Directive
override var version: String? = null,
/** The absolute directory location of this project */
@Directive
override var directory: String = ".",
/** The build directory, relative to the project directory */
@Directive
override var buildDirectory: String = "kobaltBuild",
@Directive
override var group: String? = null,
@Directive
override var artifactId: String? = name,
@Directive
override var dependencies: Dependencies? = null,
@Directive
override var packaging: String? = null)
: Project(name, version, directory, buildDirectory, group, artifactId, packaging, dependencies, ".kt") {
override public fun toString() = toString("KotlinProject", "name", name)
}