Compare commits
12 commits
Author | SHA1 | Date | |
---|---|---|---|
61fb42662e | |||
1e60de14b2 | |||
8723cf38a0 | |||
575b143d4c | |||
7ed7839a2d | |||
fdcf92fd8f | |||
787e24abdb | |||
b9a81eaf7a | |||
f405f7ce49 | |||
15dd53897b | |||
b1a0fb1325 | |||
a917838ad9 |
16 changed files with 121 additions and 730 deletions
37
.circleci/config.yml
Normal file
37
.circleci/config.yml
Normal file
|
@ -0,0 +1,37 @@
|
|||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/openjdk:8-jdk
|
||||
|
||||
working_directory: ~/repo
|
||||
|
||||
environment:
|
||||
JVM_OPTS: -Xmx3200m
|
||||
TERM: dumb
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- kobalt-dependencies-{{ checksum "kobalt/src/Build.kt" }}
|
||||
# fallback to using the latest cache if no exact match is found
|
||||
- kobalt-dependencies-
|
||||
|
||||
- run:
|
||||
name: Check Versions
|
||||
command: ./kobaltw checkVersions
|
||||
|
||||
- save_cache:
|
||||
paths: ~/.kobalt
|
||||
key: kobalt-dependencies-{{ checksum "kobalt/src/Build.kt" }}
|
||||
|
||||
- run:
|
||||
name: Assemble & Test
|
||||
command: ./kobaltw assemble test
|
||||
|
||||
- store_artifacts:
|
||||
path: kobaltBuild/test-output/
|
||||
destination: test-output
|
||||
- store_test_results:
|
||||
path: kobaltBuild/test-output/
|
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="PROJECT_PROFILE" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
2
.idea/kobalt.xml
generated
2
.idea/kobalt.xml
generated
|
@ -6,7 +6,7 @@
|
|||
<option name="autoDownloadKobalt" value="true" />
|
||||
<option name="downloadSources" value="false" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.86" />
|
||||
<option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.90" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# PropertyFile plug-in for [Kobalt](http://beust.com/kobalt/home/index.html)
|
||||
|
||||
[](http://opensource.org/licenses/BSD-3-Clause) [](https://travis-ci.org/ethauvin/kobalt-property-file) [](https://circleci.com/gh/ethauvin/kobalt-property-file/tree/master) [  ](https://bintray.com/ethauvin/maven/kobalt-property-file/0.9.0/link)
|
||||
[](http://opensource.org/licenses/BSD-3-Clause) [](https://github.com/ethauvin/kobalt-property-file/releases/latest) [](https://travis-ci.org/ethauvin/kobalt-property-file) [](https://circleci.com/gh/ethauvin/kobalt-property-file/tree/master) [ ](https://bintray.com/ethauvin/maven/kobalt-property-file/_latestVersion)
|
||||
|
||||
The PropertyFile plug-in provides an optional task for editing [property files](https://docs.oracle.com/javase/tutorial/essential/environment/properties.html). It is inspired by the [ant PropertyFile task](https://ant.apache.org/manual/Tasks/propertyfile.html).
|
||||
|
||||
|
|
13
circle.yml
13
circle.yml
|
@ -1,13 +0,0 @@
|
|||
machine:
|
||||
java:
|
||||
version: oraclejdk8
|
||||
|
||||
dependencies:
|
||||
override:
|
||||
- chmod +x kobaltw
|
||||
|
||||
test:
|
||||
override:
|
||||
- ./kobaltw assemble test
|
||||
post:
|
||||
- cp -r kobaltBuild/test-output/* $CIRCLE_TEST_REPORTS/
|
|
@ -21,7 +21,7 @@ val p = project {
|
|||
}
|
||||
|
||||
dependenciesTest {
|
||||
compile("org.testng:testng:6.11")
|
||||
compile("org.testng:testng:6.13.1")
|
||||
}
|
||||
|
||||
assemble {
|
||||
|
|
|
@ -1 +1 @@
|
|||
kobalt.version=1.0.86
|
||||
kobalt.version=1.0.100
|
||||
|
|
|
@ -21,618 +21,6 @@
|
|||
<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>
|
||||
<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.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-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.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: 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: 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: org.apache.maven:maven-builder-support:jar:3.3.9">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/maven-builder-support/3.3.9/maven-builder-support-3.3.9.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.maven:maven-artifact:jar:3.3.9">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/maven-artifact/3.3.9/maven-artifact-3.3.9.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.codehaus.plexus:plexus-component-annotations:jar:1.6">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/codehaus/plexus/plexus-component-annotations/1.6/plexus-component-annotations-1.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.codehaus.plexus:plexus-interpolation:jar:1.21">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/codehaus/plexus/plexus-interpolation/1.21/plexus-interpolation-1.21.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: commons-codec:commons-codec:jar:1.6">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/commons-codec/commons-codec/1.6/commons-codec-1.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: commons-logging:commons-logging:jar:1.1.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.httpcomponents:httpcore:jar:4.3.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/httpcomponents/httpcore/4.3.3/httpcore-4.3.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.squareup.okio:okio:jar:1.8.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/com/squareup/okio/okio/1.8.0/okio-1.8.0.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: 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.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: 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.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.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.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: 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.eclipse.aether:aether-impl:jar:1.0.2.v20150114">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/eclipse/aether/aether-impl/1.0.2.v20150114/aether-impl-1.0.2.v20150114.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.eclipse.aether:aether-util:jar:1.0.2.v20150114">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/eclipse/aether/aether-util/1.0.2.v20150114/aether-util-1.0.2.v20150114.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.eclipse.aether:aether-spi:jar:1.0.2.v20150114">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/eclipse/aether/aether-spi/1.0.2.v20150114/aether-spi-1.0.2.v20150114.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.eclipse.aether:aether-api:jar:1.0.2.v20150114">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/eclipse/aether/aether-api/1.0.2.v20150114/aether-api-1.0.2.v20150114.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.maven:maven-repository-metadata:jar:3.3.9">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/maven-repository-metadata/3.3.9/maven-repository-metadata-3.3.9.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.maven:maven-model-builder:jar:3.3.9">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/maven-model-builder/3.3.9/maven-model-builder-3.3.9.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.slf4j:jcl-over-slf4j:jar:1.6.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/slf4j/jcl-over-slf4j/1.6.2/jcl-over-slf4j-1.6.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.slf4j:slf4j-api:jar:1.7.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/slf4j/slf4j-api/1.7.3/slf4j-api-1.7.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.httpcomponents:httpclient:jar:4.3.6">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/httpcomponents/httpclient/4.3.6/httpclient-4.3.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.googlecode.javaewah:JavaEWAH:jar:0.7.9">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/com/googlecode/javaewah/JavaEWAH/0.7.9/JavaEWAH-0.7.9.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.jcraft:jsch:jar:0.1.53">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/com/jcraft/jsch/0.1.53/jsch-0.1.53.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.google.code.gson:gson:jar:2.7">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/com/google/code/gson/gson/2.7/gson-2.7.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.squareup.okhttp3:okhttp:jar:3.3.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/com/squareup/okhttp3/okhttp/3.3.0/okhttp-3.3.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.commons:commons-lang3:jar:3.4">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.codehaus.plexus:plexus-utils:jar:3.0.22">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: aopalliance:aopalliance:jar:1.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/aopalliance/aopalliance/1.0/aopalliance-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: javax.inject:javax.inject:jar:1">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/javax/inject/javax.inject/1/javax.inject-1.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.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.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.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.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-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: 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.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: org.apache.maven:maven-aether-provider:jar:3.3.9">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/maven-aether-provider/3.3.9/maven-aether-provider-3.3.9.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.maven.resolver:maven-resolver-transport-file:jar:1.0.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/resolver/maven-resolver-transport-file/1.0.3/maven-resolver-transport-file-1.0.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.maven.resolver:maven-resolver-transport-http:jar:1.0.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/resolver/maven-resolver-transport-http/1.0.3/maven-resolver-transport-http-1.0.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.maven.resolver:maven-resolver-connector-basic:jar:1.0.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/resolver/maven-resolver-connector-basic/1.0.3/maven-resolver-connector-basic-1.0.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.maven.resolver:maven-resolver-impl:jar:1.0.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/resolver/maven-resolver-impl/1.0.3/maven-resolver-impl-1.0.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.maven.resolver:maven-resolver-util:jar:1.0.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/resolver/maven-resolver-util/1.0.3/maven-resolver-util-1.0.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.maven.resolver:maven-resolver-spi:jar:1.0.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/resolver/maven-resolver-spi/1.0.3/maven-resolver-spi-1.0.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.maven.resolver:maven-resolver-api:jar:1.0.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/resolver/maven-resolver-api/1.0.3/maven-resolver-api-1.0.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.slf4j:slf4j-simple:jar:1.7.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/slf4j/slf4j-simple/1.7.3/slf4j-simple-1.7.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.eclipse.jgit:org.eclipse.jgit:jar:4.5.0.201609210915-r">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/eclipse/jgit/org.eclipse.jgit/4.5.0.201609210915-r/org.eclipse.jgit-4.5.0.201609210915-r.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.squareup.retrofit2:converter-gson:jar:2.1.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/com/squareup/retrofit2/converter-gson/2.1.0/converter-gson-2.1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.squareup.retrofit2:retrofit:jar:2.1.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/com/squareup/retrofit2/retrofit/2.1.0/retrofit-2.1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: io.reactivex:rxjava:jar:1.1.5">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/io/reactivex/rxjava/1.1.5/rxjava-1.1.5.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: org.apache.maven:maven-model:jar:3.3.9">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/maven/maven-model/3.3.9/maven-model-3.3.9.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.google.guava:guava:jar:19.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/com/google/guava/guava/19.0/guava-19.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.google.inject.extensions:guice-assistedinject:jar:4.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/com/google/inject/extensions/guice-assistedinject/4.0/guice-assistedinject-4.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.google.inject:guice:jar:4.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/com/google/inject/guice/4.0/guice-4.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</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" scope="TEST">
|
||||
<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" scope="TEST">
|
||||
<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.jetbrains.kotlin:kotlin-stdlib:jar:1.1.2-4">
|
||||
<CLASSES>
|
||||
|
@ -642,6 +30,24 @@
|
|||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<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" scope="TEST">
|
||||
<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.jetbrains:annotations:jar:13.0">
|
||||
<CLASSES>
|
||||
|
|
|
@ -18,6 +18,17 @@
|
|||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.beust.kobalt:kobalt:jar:1.0.89">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.89/kobalt/wrapper/kobalt-1.0.89.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.89/kobalt/wrapper/kobalt-1.0.89-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: kobalt-versioneye-0.4.5.jar">
|
||||
<CLASSES>
|
||||
|
@ -27,16 +38,5 @@
|
|||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.beust.kobalt:kobalt:jar:1.0.86">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.86/kobalt/wrapper/kobalt-1.0.86.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.86/kobalt/wrapper/kobalt-1.0.86-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
|
@ -5,7 +5,6 @@ import com.beust.kobalt.plugin.publish.autoGitTag
|
|||
import com.beust.kobalt.plugin.publish.bintray
|
||||
import com.beust.kobalt.profile
|
||||
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
|
||||
|
@ -13,7 +12,7 @@ import org.apache.maven.model.Scm
|
|||
|
||||
val bs = buildScript {
|
||||
repos(localMaven())
|
||||
plugins("net.thauvin.erik:kobalt-versioneye:", "net.thauvin.erik:kobalt-maven-local:")
|
||||
plugins("net.thauvin.erik:kobalt-maven-local:")
|
||||
}
|
||||
|
||||
val dev by profile()
|
||||
|
@ -46,11 +45,11 @@ val p = project {
|
|||
|
||||
dependencies {
|
||||
compileOnly("com.beust:$kobaltDependency:")
|
||||
compile("org.jetbrains.kotlin:kotlin-stdlib:1.1.2-4")
|
||||
compile("org.jetbrains.kotlin:kotlin-stdlib:1.2.20")
|
||||
}
|
||||
|
||||
dependenciesTest {
|
||||
compile("org.testng:testng:6.11")
|
||||
compile("org.testng:testng:6.13.1")
|
||||
}
|
||||
|
||||
assemble {
|
||||
|
@ -65,6 +64,7 @@ val p = project {
|
|||
|
||||
autoGitTag {
|
||||
enabled = true
|
||||
push = false
|
||||
message = "Version $version"
|
||||
}
|
||||
|
||||
|
@ -73,9 +73,4 @@ val p = project {
|
|||
description = "Release version $version"
|
||||
vcsTag = version
|
||||
}
|
||||
|
||||
versionEye {
|
||||
org = "Thauvin"
|
||||
team = "Owners"
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
kobalt.version=1.0.86
|
||||
kobalt.version=1.0.100
|
0
kobaltw
Normal file → Executable file
0
kobaltw
Normal file → Executable file
42
pom.xml
42
pom.xml
|
@ -1,42 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.thauvin.erik</groupId>
|
||||
<artifactId>kobalt-property-file</artifactId>
|
||||
<version>0.9.0</version>
|
||||
<name>kobalt-property-file</name>
|
||||
<description>PropertyFile plug-in for the Kobalt build system.</description>
|
||||
<url>https://github.com/ethauvin/kobalt-property-file</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>BSD 3-Clause</name>
|
||||
<url>https://opensource.org/licenses/BSD-3-Clause</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>ethauvin</id>
|
||||
<name>Erik C. Thauvin</name>
|
||||
<email>erik@thauvin.net</email>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>https://github.com/ethauvin/kobalt-property-file.git</connection>
|
||||
<developerConnection>git@github.com:ethauvin/kobalt-property-file.git</developerConnection>
|
||||
<url>https://github.com/ethauvin/kobalt-property-file</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.beust</groupId>
|
||||
<artifactId>kobalt-plugin-api</artifactId>
|
||||
<version>(0,]</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<version>6.11</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -109,9 +109,9 @@ class PropertyFilePlugin @Inject constructor(val taskContributor: TaskContributo
|
|||
p.remove(entry.key)
|
||||
} else {
|
||||
when (type) {
|
||||
Types.DATE -> success = Utils.processDate(p, entry)
|
||||
Types.INT -> success = Utils.processInt(p, entry)
|
||||
else -> success = Utils.processString(p, entry)
|
||||
Types.DATE -> success = PropertyFileUtils.processDate(p, entry)
|
||||
Types.INT -> success = PropertyFileUtils.processInt(p, entry)
|
||||
else -> success = PropertyFileUtils.processString(p, entry)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Utils.kt
|
||||
* PropertyFileUtils.kt
|
||||
*
|
||||
* Copyright (c) 2017, Erik C. Thauvin (erik@thauvin.net)
|
||||
* All rights reserved.
|
||||
|
@ -32,10 +32,12 @@
|
|||
package net.thauvin.erik.kobalt.plugin.propertyfile
|
||||
|
||||
import com.beust.kobalt.misc.warn
|
||||
import java.text.*
|
||||
import java.text.DecimalFormat
|
||||
import java.text.ParseException
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
class Utils private constructor() {
|
||||
class PropertyFileUtils private constructor() {
|
||||
companion object {
|
||||
private val calendarFields = mapOf(
|
||||
Units.MILLISECOND to Calendar.MILLISECOND,
|
||||
|
@ -51,7 +53,7 @@ class Utils private constructor() {
|
|||
fun processDate(p: Properties, entry: Entry): Boolean {
|
||||
var success = true
|
||||
val cal = Calendar.getInstance()
|
||||
val value = Utils.currentValue(p.getProperty(entry.key), entry.value, entry.default, entry.operation)
|
||||
val value = PropertyFileUtils.currentValue(p.getProperty(entry.key), entry.value, entry.default, entry.operation)
|
||||
|
||||
val fmt = SimpleDateFormat(if (entry.pattern.isBlank()) "yyyy-MM-dd HH:mm" else entry.pattern)
|
||||
|
||||
|
@ -92,7 +94,7 @@ class Utils private constructor() {
|
|||
var intValue: Int
|
||||
try {
|
||||
val fmt = DecimalFormat(entry.pattern)
|
||||
val value = Utils.currentValue(p.getProperty(entry.key), entry.value, entry.default, entry.operation)
|
||||
val value = PropertyFileUtils.currentValue(p.getProperty(entry.key), entry.value, entry.default, entry.operation)
|
||||
|
||||
intValue = fmt.parse(if (value.isBlank()) "0" else value).toInt()
|
||||
|
||||
|
@ -121,7 +123,7 @@ class Utils private constructor() {
|
|||
}
|
||||
|
||||
fun processString(p: Properties, entry: Entry): Boolean {
|
||||
val value = Utils.currentValue(p.getProperty(entry.key), entry.value, entry.default, entry.operation)
|
||||
val value = PropertyFileUtils.currentValue(p.getProperty(entry.key), entry.value, entry.default, entry.operation)
|
||||
|
||||
if (entry.operation == Operations.SET) {
|
||||
p.setProperty(entry.key, value)
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* UtilsTest.kt
|
||||
* PropertyFileUtilsTest.kt
|
||||
*
|
||||
* Copyright (c) 2017, Erik C. Thauvin (erik@thauvin.net)
|
||||
* All rights reserved.
|
||||
|
@ -37,7 +37,7 @@ import java.text.SimpleDateFormat
|
|||
import java.util.*
|
||||
|
||||
@Test
|
||||
class UtilsTest {
|
||||
class PropertyFileUtilsTest {
|
||||
val p = Properties()
|
||||
|
||||
@Test
|
||||
|
@ -51,35 +51,35 @@ class UtilsTest {
|
|||
// If only value is specified, the property is set to it regardless of its previous value.
|
||||
prev = "previous"
|
||||
value = "value"
|
||||
Assert.assertEquals(Utils.currentValue(prev, value, default, operation), value,
|
||||
Assert.assertEquals(PropertyFileUtils.currentValue(prev, value, default, operation), value,
|
||||
"currentValue($prev,$value,$default,$operation)")
|
||||
|
||||
// If only default is specified and the property previously existed, it is unchanged.
|
||||
prev = "previous"
|
||||
value = null
|
||||
default = "default"
|
||||
Assert.assertEquals(Utils.currentValue(prev, value, default, operation), prev,
|
||||
Assert.assertEquals(PropertyFileUtils.currentValue(prev, value, default, operation), prev,
|
||||
"currentValue($prev,$value,$default,$operation)")
|
||||
|
||||
// If only default is specified and the property did not exist, the property is set to default.
|
||||
prev = null
|
||||
value = null
|
||||
default = "default"
|
||||
Assert.assertEquals(Utils.currentValue(prev, value, default, operation), default,
|
||||
Assert.assertEquals(PropertyFileUtils.currentValue(prev, value, default, operation), default,
|
||||
"currentValue($prev,$value,$default,$operation)")
|
||||
|
||||
// If value and default are both specified and the property previously existed, the property is set to value.
|
||||
prev = "previous"
|
||||
value ="value"
|
||||
default = "default"
|
||||
Assert.assertEquals(Utils.currentValue(prev, value, default, operation), value,
|
||||
Assert.assertEquals(PropertyFileUtils.currentValue(prev, value, default, operation), value,
|
||||
"currentValue($prev,$value,$default,$operation)")
|
||||
|
||||
// If value and default are both specified and the property did not exist, the property is set to default.
|
||||
prev = null
|
||||
value = "value"
|
||||
default ="default"
|
||||
Assert.assertEquals(Utils.currentValue(prev, value, default, operation), default,
|
||||
Assert.assertEquals(PropertyFileUtils.currentValue(prev, value, default, operation), default,
|
||||
"currentValue($prev,$value,$default,$operation)")
|
||||
|
||||
// ADD
|
||||
|
@ -88,31 +88,31 @@ class UtilsTest {
|
|||
prev = null
|
||||
value = "value"
|
||||
default = "default"
|
||||
Assert.assertEquals(Utils.currentValue(prev, value, default, operation), default,
|
||||
Assert.assertEquals(PropertyFileUtils.currentValue(prev, value, default, operation), default,
|
||||
"currentValue($prev,$value,$default,$operation)")
|
||||
|
||||
prev = "prev"
|
||||
value = "value"
|
||||
default = null
|
||||
Assert.assertEquals(Utils.currentValue(prev, value, default, operation), prev,
|
||||
Assert.assertEquals(PropertyFileUtils.currentValue(prev, value, default, operation), prev,
|
||||
"currentValue($prev,$value,$default,$operation)")
|
||||
|
||||
prev = null
|
||||
value = "value"
|
||||
default = null
|
||||
Assert.assertEquals(Utils.currentValue(prev, value, default, operation), "",
|
||||
Assert.assertEquals(PropertyFileUtils.currentValue(prev, value, default, operation), "",
|
||||
"currentValue($prev,$value,$default,$operation)")
|
||||
|
||||
prev = null
|
||||
value = "value"
|
||||
default = "default"
|
||||
Assert.assertEquals(Utils.currentValue(prev, value, default, operation), default,
|
||||
Assert.assertEquals(PropertyFileUtils.currentValue(prev, value, default, operation), default,
|
||||
"currentValue($prev,$value,$default,$operation)")
|
||||
|
||||
prev = null
|
||||
value = null
|
||||
default = null
|
||||
Assert.assertEquals(Utils.currentValue(prev, value, default, operation), "",
|
||||
Assert.assertEquals(PropertyFileUtils.currentValue(prev, value, default, operation), "",
|
||||
"currentValue($prev,$value,$default,$operation)")
|
||||
}
|
||||
|
||||
|
@ -123,13 +123,13 @@ class UtilsTest {
|
|||
entry.key = "version.major"
|
||||
entry.value = "1"
|
||||
|
||||
Utils.processString(p, entry)
|
||||
PropertyFileUtils.processString(p, entry)
|
||||
Assert.assertEquals(entry.value, p.getProperty(entry.key), "processString(${entry.key}, ${entry.value})")
|
||||
|
||||
entry.key = "version.minor"
|
||||
entry.value = "0"
|
||||
|
||||
Utils.processString(p, entry)
|
||||
PropertyFileUtils.processString(p, entry)
|
||||
Assert.assertEquals(entry.value, p.getProperty(entry.key), "processString(${entry.key}, ${entry.value})")
|
||||
}
|
||||
|
||||
|
@ -141,38 +141,38 @@ class UtilsTest {
|
|||
entry.key = "version.patch"
|
||||
|
||||
entry.value = "a"
|
||||
Assert.assertFalse(Utils.processInt(p, entry), "parsetInt(${entry.key}, a)")
|
||||
Assert.assertFalse(PropertyFileUtils.processInt(p, entry), "parsetInt(${entry.key}, a)")
|
||||
|
||||
// ADD
|
||||
entry.operation = Operations.ADD
|
||||
|
||||
entry.value = "1"
|
||||
entry.default = "-1"
|
||||
Utils.processInt(p, entry)
|
||||
PropertyFileUtils.processInt(p, entry)
|
||||
Assert.assertEquals("0", p.getProperty(entry.key), "processInt(${entry.key}, 0)")
|
||||
|
||||
entry.key = "anint"
|
||||
entry.value = null
|
||||
entry.default = "0"
|
||||
Utils.processInt(p, entry)
|
||||
PropertyFileUtils.processInt(p, entry)
|
||||
Assert.assertEquals("1", p.getProperty(entry.key), "processInt(${entry.key}, 1)")
|
||||
Utils.processInt(p, entry)
|
||||
PropertyFileUtils.processInt(p, entry)
|
||||
Assert.assertEquals("2", p.getProperty(entry.key), "processInt(${entry.key}, 2)")
|
||||
|
||||
entry.key = "formated.int"
|
||||
entry.value = null
|
||||
entry.default = "0013"
|
||||
entry.pattern = "0000"
|
||||
Utils.processInt(p, entry)
|
||||
PropertyFileUtils.processInt(p, entry)
|
||||
Assert.assertEquals("0014", p.getProperty(entry.key), "processInt(${entry.key}, 0014)")
|
||||
Utils.processInt(p, entry)
|
||||
PropertyFileUtils.processInt(p, entry)
|
||||
Assert.assertEquals("0015", p.getProperty(entry.key), "processInt(${entry.key}, 0015)")
|
||||
|
||||
entry.key = "formated.int"
|
||||
entry.value = "2"
|
||||
entry.default = "0013"
|
||||
entry.pattern = "0000"
|
||||
Utils.processInt(p, entry)
|
||||
PropertyFileUtils.processInt(p, entry)
|
||||
Assert.assertEquals("0017", p.getProperty(entry.key), "processInt(${entry.key}, 0017)")
|
||||
|
||||
// SUBTRACT
|
||||
|
@ -180,7 +180,7 @@ class UtilsTest {
|
|||
entry.value = null
|
||||
entry.default = "0013"
|
||||
entry.pattern = "0000"
|
||||
Utils.processInt(p, entry)
|
||||
PropertyFileUtils.processInt(p, entry)
|
||||
Assert.assertEquals("0016", p.getProperty(entry.key), "processInt(${entry.key}, 0016)")
|
||||
|
||||
}
|
||||
|
@ -195,36 +195,36 @@ class UtilsTest {
|
|||
val day = SimpleDateFormat(entry.pattern).format(Date()).toInt()
|
||||
|
||||
entry.value = "a"
|
||||
Assert.assertFalse(Utils.processDate(p, entry), "processDate(${entry.key}, a)")
|
||||
Assert.assertFalse(PropertyFileUtils.processDate(p, entry), "processDate(${entry.key}, a)")
|
||||
|
||||
entry.value = "99"
|
||||
Utils.processDate(p, entry)
|
||||
PropertyFileUtils.processDate(p, entry)
|
||||
Assert.assertEquals("99", p.getProperty(entry.key), "processDate(${entry.key}, 99)")
|
||||
|
||||
entry.value = "now"
|
||||
Utils.processDate(p, entry)
|
||||
PropertyFileUtils.processDate(p, entry)
|
||||
Assert.assertEquals("$day", p.getProperty(entry.key), "processDate(${entry.key}, now)")
|
||||
|
||||
// ADD
|
||||
entry.operation = Operations.ADD
|
||||
|
||||
entry.value = "1"
|
||||
Utils.processDate(p, entry)
|
||||
PropertyFileUtils.processDate(p, entry)
|
||||
Assert.assertEquals("${day+1}", p.getProperty(entry.key), "processDate(${entry.key}, now+1)")
|
||||
|
||||
entry.value = "2"
|
||||
Utils.processDate(p, entry)
|
||||
PropertyFileUtils.processDate(p, entry)
|
||||
Assert.assertEquals("${day+3}", p.getProperty(entry.key), "processDate(${entry.key}, now+3)")
|
||||
|
||||
// SUBTRACT
|
||||
entry.operation = Operations.SUBTRACT
|
||||
entry.value = "3"
|
||||
Utils.processDate(p, entry)
|
||||
PropertyFileUtils.processDate(p, entry)
|
||||
Assert.assertEquals("$day", p.getProperty(entry.key), "processDate(${entry.key}, now-3)")
|
||||
|
||||
entry.operation = Operations.SUBTRACT
|
||||
entry.value = "2"
|
||||
Utils.processDate(p, entry)
|
||||
PropertyFileUtils.processDate(p, entry)
|
||||
Assert.assertEquals("${day-2}", p.getProperty(entry.key), "processDate(${entry.key}, now-2)")
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue