Kotlin 1.1 and Kobalt 1.0.x optimization

This commit is contained in:
Erik C. Thauvin 2017-03-06 14:20:01 -08:00
parent d6302918bf
commit 29d9bc6288
4 changed files with 15 additions and 14 deletions

View file

@ -9,7 +9,9 @@ To use the plug-in include the following in your `Build.kt` file:
```kotlin ```kotlin
import net.thauvin.erik.kobalt.plugin.maven.local.* import net.thauvin.erik.kobalt.plugin.maven.local.*
val pl = plugins("net.thauvin.erik:kobalt-maven-local:") val bs = buildScript {
plugins("net.thauvin.erik:kobalt-maven-local:")
}
val p = project { val p = project {
name = "example" name = "example"

View file

@ -4,10 +4,10 @@ import com.beust.kobalt.plugin.application.*
import com.beust.kobalt.plugin.java.* import com.beust.kobalt.plugin.java.*
import net.thauvin.erik.kobalt.plugin.maven.local.* import net.thauvin.erik.kobalt.plugin.maven.local.*
val repos = repos(localMaven()) val bs = buildScript {
repos(localMaven())
//val pl = plugins(file("../kobaltBuild/libs/kobalt-maven-local-0.5.1.jar")) plugins("net.thauvin.erik:kobalt-maven-local:0.5.1")
val pl = plugins("net.thauvin.erik:kobalt-maven-local:0.5.1") }
val example = project { val example = project {

View file

@ -1,23 +1,22 @@
import com.beust.kobalt.buildScript
import com.beust.kobalt.plugin.packaging.assemble import com.beust.kobalt.plugin.packaging.assemble
import com.beust.kobalt.plugin.publish.bintray import com.beust.kobalt.plugin.publish.bintray
import com.beust.kobalt.plugins
import com.beust.kobalt.project import com.beust.kobalt.project
import com.beust.kobalt.repos import net.thauvin.erik.kobalt.plugin.versioneye.versionEye
import org.apache.maven.model.Developer import org.apache.maven.model.Developer
import org.apache.maven.model.License import org.apache.maven.model.License
import org.apache.maven.model.Model import org.apache.maven.model.Model
import org.apache.maven.model.Scm import org.apache.maven.model.Scm
import net.thauvin.erik.kobalt.plugin.versioneye.*
val bs = buildScript {
val pl = plugins("net.thauvin.erik:kobalt-versioneye:") plugins("net.thauvin.erik:kobalt-versioneye:")
val repos = repos() }
val dev = false val dev = false
val kobaltDependency = if (dev) "kobalt" else "kobalt-plugin-api" val kobaltDependency = if (dev) "kobalt" else "kobalt-plugin-api"
val p = project { val p = project {
name = "kobalt-maven-local" name = "kobalt-maven-local"
group = "net.thauvin.erik" group = "net.thauvin.erik"
artifactId = name artifactId = name

View file

@ -1,7 +1,7 @@
/* /*
* MavenLocalPlugin.kt * MavenLocalPlugin.kt
* *
* Copyright (c) 2016, Erik C. Thauvin (erik@thauvin.net) * Copyright (c) 2016-2017, Erik C. Thauvin (erik@thauvin.net)
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -42,7 +42,7 @@ import java.nio.file.Files
import java.nio.file.Paths import java.nio.file.Paths
import java.util.* import java.util.*
public class MavenLocalPlugin : BasePlugin(), ILocalMavenRepoPathInterceptor { class MavenLocalPlugin : BasePlugin(), ILocalMavenRepoPathInterceptor {
val MAVEN_LOCAL_REPO_PROPERTY = "maven.repo.local" val MAVEN_LOCAL_REPO_PROPERTY = "maven.repo.local"
var mvnLocalPath: String? = null var mvnLocalPath: String? = null