Compare commits

..

14 commits

19 changed files with 309 additions and 176 deletions

5
.gitattributes vendored Normal file
View file

@ -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

6
.gitignore vendored
View file

@ -4,8 +4,9 @@
**/.idea/tasks.xml **/.idea/tasks.xml
**/.idea/workspace.xml **/.idea/workspace.xml
*.iws *.iws
.DS_Store *.sublime-*
.classpath .classpath
.DS_Store
.gradle .gradle
.kobalt .kobalt
.nb-gradle .nb-gradle
@ -18,12 +19,13 @@
/example/libs /example/libs
/gen /gen
/gradle.properties /gradle.properties
/libs
/local.properties /local.properties
/out /out
/proguard-project.txt /proguard-project.txt
/project.properties /project.properties
/target /target
/test-output /test-output
Thumbs.db
ehthumbs.db ehthumbs.db
kobaltBuild kobaltBuild
Thumbs.db

2
.idea/kobalt.xml generated
View file

@ -5,7 +5,7 @@
<KobaltProjectSettings> <KobaltProjectSettings>
<option name="autoDownloadKobalt" value="true" /> <option name="autoDownloadKobalt" value="true" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.6" /> <option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.69" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />

2
.idea/misc.xml generated
View file

@ -38,7 +38,7 @@
<property name="caretWidth" class="java.lang.Integer" /> <property name="caretWidth" class="java.lang.Integer" />
</properties> </properties>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" project-jdk-name="1.8.x" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8.x" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/kobaltBuild/classes" /> <output url="file://$PROJECT_DIR$/kobaltBuild/classes" />
</component> </component>
</project> </project>

1
.idea/modules.xml generated
View file

@ -3,7 +3,6 @@
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/kobalt/Build.kt.iml" filepath="$PROJECT_DIR$/kobalt/Build.kt.iml" /> <module fileurl="file://$PROJECT_DIR$/kobalt/Build.kt.iml" filepath="$PROJECT_DIR$/kobalt/Build.kt.iml" />
<module fileurl="file://$PROJECT_DIR$/example/example.iml" filepath="$PROJECT_DIR$/example/example.iml" />
<module fileurl="file://$PROJECT_DIR$/kobalt-maven-local.iml" filepath="$PROJECT_DIR$/kobalt-maven-local.iml" /> <module fileurl="file://$PROJECT_DIR$/kobalt-maven-local.iml" filepath="$PROJECT_DIR$/kobalt-maven-local.iml" />
</modules> </modules>
</component> </component>

3
.idea/scopes/Copyright.xml generated Normal file
View file

@ -0,0 +1,3 @@
<component name="DependencyValidationManager">
<scope name="Copyright" pattern="file[kobalt-maven-local]:src/main/kotlin/*.kt" />
</component>

View file

@ -1,3 +0,0 @@
<component name="DependencyValidationManager">
<scope name="Source" pattern="file[kobalt-maven-local]:src/main/kotlin/*.kt" />
</component>

View file

@ -13,4 +13,7 @@ cache:
- $HOME/.m2 - $HOME/.m2
- $HOME/.kobalt - $HOME/.kobalt
before_cache:
- rm -rf .kobalt/*
script: ./kobaltw clean assemble script: ./kobaltw clean assemble

View file

@ -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. 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

View file

@ -16,15 +16,6 @@ val p = project {
} }
``` ```
Use the `localMaven()` directive to tell Kobalt to look for artifacts in the Maven Local Repository:
```kotlin
val bs = buildScript {
...
repos(localMaven())
}
```
To publish to the Maven Local Repository use the `publishToMavenLocal` task: To publish to the Maven Local Repository use the `publishToMavenLocal` task:
``` ```

View file

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="example" external.linked.project.path="$MODULE_DIR$/.." external.root.project.path="$MODULE_DIR$/.." external.system.id="KOBALT" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/../kobaltBuild/classes" />
<output-test url="file://$MODULE_DIR$/../kobaltBuild/test-classes" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/kobaltBuild" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="kobalt-maven-local" />
</component>
</module>

View file

@ -3,36 +3,21 @@ import com.beust.kobalt.plugin.packaging.*
import com.beust.kobalt.plugin.application.* import com.beust.kobalt.plugin.application.*
import com.beust.kobalt.plugin.java.* import com.beust.kobalt.plugin.java.*
// ./kobaltw run --log 2 // ./kobaltw run
// ./kobaltw puslishToMavenLocal
val bs = buildScript { val bs = buildScript {
//repos(file("K:/maven/repository"))
plugins("net.thauvin.erik:kobalt-maven-local:") plugins("net.thauvin.erik:kobalt-maven-local:")
repos(localMaven())
} }
val example = project { val example = project {
// println(" >>> LOCAL MAVEN REPO: " + localMaven()) println(" >>> LOCAL MAVEN REPO: " + localMaven().removePrefix("file:/"))
name = "example" name = "example"
group = "com.example"
artifactId = name
version = "0.1" version = "0.1"
sourceDirectories {
path("src/main/java")
}
sourceDirectoriesTest {
path("src/test/java")
}
dependencies {
}
dependenciesTest {
}
assemble { assemble {
jar { jar {
} }

View file

@ -1 +1 @@
kobalt.version=1.0.6 kobalt.version=1.0.75

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="kobalt-maven-local" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="KOBALT" type="JAVA_MODULE" version="4"> <module external.linked.project.id="kobalt-maven-local" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="KOBALT" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false"> <component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/kobaltBuild/classes" /> <output url="file://$MODULE_DIR$/kobaltBuild/classes" />
<output-test url="file://$MODULE_DIR$/kobaltBuild/test-classes" /> <output-test url="file://$MODULE_DIR$/kobaltBuild/test-classes" />
<exclude-output /> <exclude-output />
@ -12,15 +12,6 @@
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library name="Kobalt: com.beust:kobalt-plugin-api:jar:(0,]">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/com/beust/kobalt-plugin-api/0.939/kobalt-plugin-api-0.939.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library"> <orderEntry type="module-library">
<library name="Kobalt: org.apache.maven:maven-artifact:jar:3.3.9"> <library name="Kobalt: org.apache.maven:maven-artifact:jar:3.3.9">
<CLASSES> <CLASSES>
@ -381,15 +372,6 @@
<SOURCES /> <SOURCES />
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: com.beust:jcommander:jar:1.48">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/com/beust/jcommander/1.48/jcommander-1.48.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library"> <orderEntry type="module-library">
<library name="Kobalt: com.squareup.retrofit2:converter-gson:jar:2.1.0"> <library name="Kobalt: com.squareup.retrofit2:converter-gson:jar:2.1.0">
<CLASSES> <CLASSES>
@ -471,5 +453,239 @@
<SOURCES /> <SOURCES />
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: com.beust:kobalt-plugin-api:jar:(0,]">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/com/beust/kobalt-plugin-api/1.0.68/kobalt-plugin-api-1.0.68.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.jetbrains.kotlin:kotlin-stdlib:jar:1.1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/jetbrains/kotlin/kotlin-stdlib/1.1.1/kotlin-stdlib-1.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.testng.testng-remote:testng-remote:jar:1.3.2">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/testng/testng-remote/testng-remote/1.3.2/testng-remote-1.3.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: commons-io:commons-io:jar:2.5">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/commons-io/commons-io/2.5/commons-io-2.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.junit.platform:junit-platform-surefire-provider:jar:1.0.0-M4">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/junit/platform/junit-platform-surefire-provider/1.0.0-M4/junit-platform-surefire-provider-1.0.0-M4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.junit.platform:junit-platform-runner:jar:1.0.0-M4">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/junit/platform/junit-platform-runner/1.0.0-M4/junit-platform-runner-1.0.0-M4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.junit.platform:junit-platform-console:jar:1.0.0-M4">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/junit/platform/junit-platform-console/1.0.0-M4/junit-platform-console-1.0.0-M4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.junit.jupiter:junit-jupiter-engine:jar:5.0.0-M4">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/junit/jupiter/junit-jupiter-engine/5.0.0-M4/junit-jupiter-engine-5.0.0-M4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.junit.vintage:junit-vintage-engine:jar:4.12.0-M4">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/junit/vintage/junit-vintage-engine/4.12.0-M4/junit-vintage-engine-4.12.0-M4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.apache.commons:commons-compress:jar:1.13">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/commons/commons-compress/1.13/commons-compress-1.13.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.jetbrains:annotations:jar:13.0">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/jetbrains/annotations/13.0/annotations-13.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: com.google.auto.service:auto-service:jar:1.0-rc3">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/com/google/auto/service/auto-service/1.0-rc3/auto-service-1.0-rc3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.testng:testng:jar:6.11">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/testng/testng/6.11/testng-6.11.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.junit.platform:junit-platform-launcher:jar:1.0.0-M4">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/junit/platform/junit-platform-launcher/1.0.0-M4/junit-platform-launcher-1.0.0-M4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.apache.maven.surefire:surefire-api:jar:2.19.1">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/surefire/surefire-api/2.19.1/surefire-api-2.19.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.apache.maven.surefire:common-java5:jar:2.19.1">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/surefire/common-java5/2.19.1/common-java5-2.19.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.junit.platform:junit-platform-suite-api:jar:1.0.0-M4">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/junit/platform/junit-platform-suite-api/1.0.0-M4/junit-platform-suite-api-1.0.0-M4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: junit:junit:jar:4.12">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/junit/junit/4.12/junit-4.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.junit.jupiter:junit-jupiter-api:jar:5.0.0-M4">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/junit/jupiter/junit-jupiter-api/5.0.0-M4/junit-jupiter-api-5.0.0-M4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: com.google.auto:auto-common:jar:0.3">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/com/google/auto/auto-common/0.3/auto-common-0.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: com.beust:jcommander:jar:1.64">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/com/beust/jcommander/1.64/jcommander-1.64.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.yaml:snakeyaml:jar:1.17">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.junit.platform:junit-platform-engine:jar:1.0.0-M4">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/junit/platform/junit-platform-engine/1.0.0-M4/junit-platform-engine-1.0.0-M4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.hamcrest:hamcrest-core:jar:1.3">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.junit.platform:junit-platform-commons:jar:1.0.0-M4">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/junit/platform/junit-platform-commons/1.0.0-M4/junit-platform-commons-1.0.0-M4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: org.opentest4j:opentest4j:jar:1.0.0-M2">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/opentest4j/opentest4j/1.0.0-M2/opentest4j-1.0.0-M2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component> </component>
</module> </module>

View file

@ -1,32 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="Build.kt" external.linked.project.path="$MODULE_DIR$/.." external.root.project.path="$MODULE_DIR$/.." external.system.id="KOBALT" type="JAVA_MODULE" version="4"> <module external.linked.project.id="Build.kt" external.linked.project.path="$MODULE_DIR$/.." external.root.project.path="$MODULE_DIR$/.." external.system.id="KOBALT" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false"> <component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/../kobaltBuild/classes" /> <output url="file://$MODULE_DIR$/out/classes" />
<output-test url="file://$MODULE_DIR$/../kobaltBuild/test-classes" /> <output-test url="file://$MODULE_DIR$/out/test-classes" />
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library name="Kobalt: kobalt-versioneye-0.4.3-beta.jar">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/net/thauvin/erik/kobalt-versioneye/0.4.3-beta/kobalt-versioneye-0.4.3-beta.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: com.beust.kobalt:kobalt:jar:1.0.6">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.6/kobalt/wrapper/kobalt-1.0.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library"> <orderEntry type="module-library">
<library name="Kobalt: kobalt-maven-local-0.5.2.jar"> <library name="Kobalt: kobalt-maven-local-0.5.2.jar">
<CLASSES> <CLASSES>
@ -36,5 +18,24 @@
<SOURCES /> <SOURCES />
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: kobalt-versioneye-0.4.4.jar">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/net/thauvin/erik/kobalt-versioneye/0.4.4/kobalt-versioneye-0.4.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: com.beust.kobalt:kobalt:jar:1.0.26">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.26/kobalt/wrapper/kobalt-1.0.26.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
</component> </component>
</module> </module>

View file

@ -1,41 +1,25 @@
import com.beust.kobalt.buildScript import com.beust.kobalt.*
import com.beust.kobalt.file import com.beust.kobalt.plugin.application.*
import com.beust.kobalt.localMaven import com.beust.kobalt.plugin.packaging.*
import com.beust.kobalt.misc.kobaltLog import com.beust.kobalt.plugin.publish.*
import com.beust.kobalt.plugin.application.application import net.thauvin.erik.kobalt.plugin.versioneye.*
import com.beust.kobalt.plugin.packaging.assemble import org.apache.maven.model.*
import com.beust.kobalt.plugin.publish.bintray
import com.beust.kobalt.project
import net.thauvin.erik.kobalt.plugin.versioneye.versionEye
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 java.io.File
val semver = "0.5.2" // ./kobaltw install
val bs = buildScript { val bs = buildScript {
val p = with(File("kobaltBuild/libs/kobalt-maven-local-$semver.jar")) { repos(file("K:/maven/repository"))
if (exists()) { plugins("net.thauvin.erik:kobalt-versioneye:")
kobaltLog(1, " >>> Using: $path")
file(path)
} else {
"net.thauvin.erik:kobalt-maven-local:"
}
}
plugins("net.thauvin.erik:kobalt-versioneye:", p)
repos(localMaven())
} }
val dev = false val dev by profile()
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
version = semver version = "0.5.3"
pom = Model().apply { pom = Model().apply {
description = "Maven Local Repository plug-in for the Kobalt build system." description = "Maven Local Repository plug-in for the Kobalt build system."
@ -56,17 +40,9 @@ val p = project {
}) })
} }
sourceDirectories {
path("src/main/kotlin")
}
sourceDirectoriesTest {
path("src/test/kotlin")
}
dependencies { dependencies {
compile("com.beust:$kobaltDependency:")
compile("org.apache.maven:maven-settings-builder:3.3.9") compile("org.apache.maven:maven-settings-builder:3.3.9")
compileOnly("com.beust:$kobaltDependency:")
} }
dependenciesTest { dependenciesTest {
@ -74,16 +50,29 @@ val p = project {
} }
install {
target = "K:/maven/repository/net/thauvin/erik/kobalt-maven-local/$version/"
}
assemble { assemble {
jar { jar {
fatJar = true fatJar = true
} }
mavenJars {} mavenJars {
fatJar = true
}
}
autoGitTag {
enabled = true
message = "Version $version"
} }
bintray { bintray {
publish = true publish = true
description = "Release version $version"
vcsTag = version
} }
versionEye { versionEye {
@ -91,37 +80,3 @@ val p = project {
team = "Owners" team = "Owners"
} }
} }
val example = project(p) {
println(" >>> LOCAL MAVEN REPO: " + localMaven())
name = "example"
group = "com.example"
artifactId = name
version = "0.1"
directory = "example"
sourceDirectories {
path("src/main/java")
}
sourceDirectoriesTest {
path("src/test/java")
}
dependencies {
}
dependenciesTest {
}
assemble {
jar {
}
}
application {
mainClass = "com.example.Main"
}
}

View file

@ -1 +1 @@
kobalt.version=1.0.6 kobalt.version=1.0.75

Binary file not shown.

View file

@ -1,8 +0,0 @@
package com.example
import org.testng.annotations.Test
class ExampleTest {
@Test
fun f() = println("Running test")
}