diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6ec2ae2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Set the default behavior, in case people don't have core.autocrlf set. +* text=auto + +# batch files are specific to windows and always crlf +*.bat eol=crlf diff --git a/.gitignore b/.gitignore index faaa3fc..6fb8d73 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,9 @@ **/.idea/tasks.xml **/.idea/workspace.xml *.iws -.DS_Store +*.sublime-* .classpath +.DS_Store .gradle .kobalt .nb-gradle @@ -18,12 +19,13 @@ /example/libs /gen /gradle.properties +/libs /local.properties /out /proguard-project.txt /project.properties /target /test-output -Thumbs.db ehthumbs.db -kobaltBuild \ No newline at end of file +kobaltBuild +Thumbs.db \ No newline at end of file diff --git a/.idea/copyright/Erik_s_Copyright_Notice.xml b/.idea/copyright/Erik_s_Copyright_Notice.xml new file mode 100644 index 0000000..6763f1b --- /dev/null +++ b/.idea/copyright/Erik_s_Copyright_Notice.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..2bbc8ca --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..8ff795e --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,53 @@ + + + + \ No newline at end of file diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml new file mode 100644 index 0000000..07b6593 --- /dev/null +++ b/.idea/kobalt.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 0000000..1c24f9a --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..8318a84 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..5b5cc73 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/scopes/Copyright.xml b/.idea/scopes/Copyright.xml new file mode 100644 index 0000000..bf34e4c --- /dev/null +++ b/.idea/scopes/Copyright.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..c42d940 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index aa9226e..9b93be0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,7 @@ cache: - $HOME/.m2 - $HOME/.kobalt +before_cache: + - rm -rf .kobalt/* + script: ./kobaltw clean assemble diff --git a/LICENSE.TXT b/LICENSE.TXT index 84fe1dc..f30d392 100644 --- a/LICENSE.TXT +++ b/LICENSE.TXT @@ -1,4 +1,4 @@ -Copyright (c) 2016, Erik C. Thauvin (erik@thauvin.net) +Copyright (c) 2016-2017, Erik C. Thauvin (erik@thauvin.net) All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index 37e0498..23215f5 100644 --- a/README.md +++ b/README.md @@ -7,21 +7,15 @@ The plug-in will detect the Maven Local Repository location, similarly to Gradle To use the plug-in include the following in your `Build.kt` file: ```kotlin -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 { name = "example" } ``` -Use the `localMaven()` directive to tell Kobalt to look for artifacts in the Maven Local Repository: - -```kotlin -val repos = repos(localMaven()) -``` - To publish to the Maven Local Repository use the `publishToMavenLocal` task: ``` @@ -47,7 +41,7 @@ To set the system property use: or in `local.properties` add: ``` -maven.repo.local=~/foo/repository +maven.repo.local=~/foo/repository ``` ### `~/.m2/settings.xml` diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index 90604c2..5008631 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -2,36 +2,22 @@ import com.beust.kobalt.* import com.beust.kobalt.plugin.packaging.* import com.beust.kobalt.plugin.application.* import com.beust.kobalt.plugin.java.* -import net.thauvin.erik.kobalt.plugin.maven.local.* -val repos = repos(localMaven()) +// ./kobaltw run +// ./kobaltw puslishToMavenLocal -//val pl = plugins(file("../kobaltBuild/libs/kobalt-maven-local-0.5.1.jar")) -val pl = plugins("net.thauvin.erik:kobalt-maven-local:0.5.1") +val bs = buildScript { + //repos(file("K:/maven/repository")) + plugins("net.thauvin.erik:kobalt-maven-local:") +} val example = project { - //println(">>> LOCAL MAVEN REPO: " + localMaven()) + println(" >>> LOCAL MAVEN REPO: " + localMaven().removePrefix("file:/")) name = "example" - group = "com.example" - artifactId = name version = "0.1" - sourceDirectories { - path("src/main/java") - } - - sourceDirectoriesTest { - path("src/test/java") - } - - dependencies { - } - - dependenciesTest { - } - assemble { jar { } @@ -40,4 +26,4 @@ val example = project { application { mainClass = "com.example.Main" } -} +} \ No newline at end of file diff --git a/example/kobalt/wrapper/kobalt-wrapper.jar b/example/kobalt/wrapper/kobalt-wrapper.jar index 055a613..5390ba7 100644 Binary files a/example/kobalt/wrapper/kobalt-wrapper.jar and b/example/kobalt/wrapper/kobalt-wrapper.jar differ diff --git a/example/kobalt/wrapper/kobalt-wrapper.properties b/example/kobalt/wrapper/kobalt-wrapper.properties index 5436766..02e723d 100644 --- a/example/kobalt/wrapper/kobalt-wrapper.properties +++ b/example/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=0.879 \ No newline at end of file +kobalt.version=1.0.75 \ No newline at end of file diff --git a/example/m2/repository/.gitignore b/example/m2/repository/.gitignore deleted file mode 100644 index 5e7d273..0000000 --- a/example/m2/repository/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/kobalt-maven-local.iml b/kobalt-maven-local.iml index 36626d0..2e06f5a 100644 --- a/kobalt-maven-local.iml +++ b/kobalt-maven-local.iml @@ -1,33 +1,183 @@ - + - - - - - + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -36,70 +186,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -108,7 +195,493 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kobalt-maven-local.ipr b/kobalt-maven-local.ipr deleted file mode 100644 index e4c0764..0000000 --- a/kobalt-maven-local.ipr +++ /dev/null @@ -1,444 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Android Lint - - - Java - - - Portability issuesJava - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.8.x - - - - - - - - \ No newline at end of file diff --git a/kobalt/Build.kt.iml b/kobalt/Build.kt.iml index 7bc9dd6..b7fe907 100644 --- a/kobalt/Build.kt.iml +++ b/kobalt/Build.kt.iml @@ -1,12 +1,41 @@ - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 70349e4..532626e 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -1,27 +1,25 @@ -import com.beust.kobalt.plugin.packaging.assemble -import com.beust.kobalt.plugin.publish.bintray -import com.beust.kobalt.plugins -import com.beust.kobalt.project -import com.beust.kobalt.repos -import org.apache.maven.model.Developer -import org.apache.maven.model.License -import org.apache.maven.model.Model -import org.apache.maven.model.Scm +import com.beust.kobalt.* +import com.beust.kobalt.plugin.application.* +import com.beust.kobalt.plugin.packaging.* +import com.beust.kobalt.plugin.publish.* import net.thauvin.erik.kobalt.plugin.versioneye.* +import org.apache.maven.model.* +// ./kobaltw install -val pl = plugins("net.thauvin.erik:kobalt-versioneye:0.4.2-beta") -val repos = repos() +val bs = buildScript { + repos(file("K:/maven/repository")) + plugins("net.thauvin.erik:kobalt-versioneye:") +} -val dev = false +val dev by profile() val kobaltDependency = if (dev) "kobalt" else "kobalt-plugin-api" val p = project { - name = "kobalt-maven-local" group = "net.thauvin.erik" artifactId = name - version = "0.5.1" + version = "0.5.3" pom = Model().apply { description = "Maven Local Repository plug-in for the Kobalt build system." @@ -42,17 +40,9 @@ val p = project { }) } - sourceDirectories { - path("src/main/kotlin") - } - - sourceDirectoriesTest { - path("src/test/kotlin") - } - dependencies { - compile("com.beust:$kobaltDependency:0.878") compile("org.apache.maven:maven-settings-builder:3.3.9") + compileOnly("com.beust:$kobaltDependency:") } dependenciesTest { @@ -60,20 +50,33 @@ val p = project { } + install { + target = "K:/maven/repository/net/thauvin/erik/kobalt-maven-local/$version/" + } + assemble { jar { fatJar = true } - mavenJars {} + mavenJars { + fatJar = true + } + } + + autoGitTag { + enabled = true + message = "Version $version" } bintray { publish = true + description = "Release version $version" + vcsTag = version } - + versionEye { org = "thauvin" team = "Owners" } -} +} \ No newline at end of file diff --git a/kobalt/wrapper/kobalt-wrapper.jar b/kobalt/wrapper/kobalt-wrapper.jar index 055a613..b2026b9 100644 Binary files a/kobalt/wrapper/kobalt-wrapper.jar and b/kobalt/wrapper/kobalt-wrapper.jar differ diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index 5436766..02e723d 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=0.879 \ No newline at end of file +kobalt.version=1.0.75 \ No newline at end of file diff --git a/lib/kotlin-reflect.jar b/lib/kotlin-reflect.jar new file mode 100644 index 0000000..a25e7b3 Binary files /dev/null and b/lib/kotlin-reflect.jar differ diff --git a/lib/kotlin-runtime-sources.jar b/lib/kotlin-runtime-sources.jar new file mode 100644 index 0000000..d96e8c0 Binary files /dev/null and b/lib/kotlin-runtime-sources.jar differ diff --git a/lib/kotlin-runtime.jar b/lib/kotlin-runtime.jar new file mode 100644 index 0000000..b58cc69 Binary files /dev/null and b/lib/kotlin-runtime.jar differ diff --git a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/maven/local/MavenLocalPlugin.kt b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/maven/local/MavenLocalPlugin.kt index 3e84b9b..7f12a4b 100644 --- a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/maven/local/MavenLocalPlugin.kt +++ b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/maven/local/MavenLocalPlugin.kt @@ -1,7 +1,7 @@ /* * MavenLocalPlugin.kt * - * Copyright (c) 2016, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2016-2017, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * 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.util.* -public class MavenLocalPlugin : BasePlugin(), ILocalMavenRepoPathInterceptor { +class MavenLocalPlugin : BasePlugin(), ILocalMavenRepoPathInterceptor { val MAVEN_LOCAL_REPO_PROPERTY = "maven.repo.local" var mvnLocalPath: String? = null diff --git a/src/test/kotlin/com/example/MainTest.kt b/src/test/kotlin/com/example/MainTest.kt deleted file mode 100644 index 96458e9..0000000 --- a/src/test/kotlin/com/example/MainTest.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example - -import org.testng.annotations.Test - -class ExampleTest { - @Test - fun f() = println("Running test") -} \ No newline at end of file