Initial commit.
This commit is contained in:
commit
d92e45eccc
20 changed files with 618 additions and 0 deletions
28
.gitignore
vendored
Normal file
28
.gitignore
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
**/.idea/dictionaries
|
||||
**/.idea/gradle.xml
|
||||
**/.idea/libraries
|
||||
**/.idea/tasks.xml
|
||||
**/.idea/workspace.xml
|
||||
*.iws
|
||||
.DS_Store
|
||||
.classpath
|
||||
.gradle
|
||||
.kobalt
|
||||
.nb-gradle
|
||||
.project
|
||||
.settings
|
||||
/bin
|
||||
/build
|
||||
/deploy
|
||||
/dist
|
||||
/gen
|
||||
/gradle.properties
|
||||
/local.properties
|
||||
/out
|
||||
/proguard-project.txt
|
||||
/project.properties
|
||||
/target
|
||||
/test-output
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
kobaltBuild
|
70
gson-test.iml
Normal file
70
gson-test.iml
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id="gson-test" 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/kotlin" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/kobaltBuild" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Kobalt: org.apache.ant:ant-launcher:jar:1.7.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.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" scope="TEST">
|
||||
<library name="Kobalt: org.testng:testng:jar:6.9.12">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/testng/testng/6.9.12/testng-6.9.12.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Kobalt: org.beanshell:bsh:jar:2.0b4">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<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" scope="TEST">
|
||||
<library name="Kobalt: org.apache.ant:ant:jar:1.7.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/ant/ant/1.7.0/ant-1.7.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
</component>
|
||||
</module>
|
345
gson-test.ipr
Normal file
345
gson-test.ipr
Normal file
|
@ -0,0 +1,345 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ClientPropertiesManager">
|
||||
<properties class="javax.swing.AbstractButton">
|
||||
<property name="hideActionText" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JComponent">
|
||||
<property name="html.disable" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JEditorPane">
|
||||
<property name="JEditorPane.w3cLengthUnits" class="java.lang.Boolean" />
|
||||
<property name="JEditorPane.honorDisplayProperties" class="java.lang.Boolean" />
|
||||
<property name="charset" class="java.lang.String" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JList">
|
||||
<property name="List.isFileList" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JPasswordField">
|
||||
<property name="JPasswordField.cutCopyAllowed" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JSlider">
|
||||
<property name="Slider.paintThumbArrowShape" class="java.lang.Boolean" />
|
||||
<property name="JSlider.isFilled" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JTable">
|
||||
<property name="Table.isFileList" class="java.lang.Boolean" />
|
||||
<property name="JTable.autoStartsEdit" class="java.lang.Boolean" />
|
||||
<property name="terminateEditOnFocusLost" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JToolBar">
|
||||
<property name="JToolBar.isRollover" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JTree">
|
||||
<property name="JTree.lineStyle" class="java.lang.String" />
|
||||
</properties>
|
||||
<properties class="javax.swing.text.JTextComponent">
|
||||
<property name="caretAspectRatio" class="java.lang.Double" />
|
||||
<property name="caretWidth" class="java.lang.Integer" />
|
||||
</properties>
|
||||
</component>
|
||||
<component name="CompilerConfiguration">
|
||||
<option name="DEFAULT_COMPILER" value="Javac" />
|
||||
<resourceExtensions />
|
||||
<wildcardResourcePatterns>
|
||||
<entry name="!?*.java" />
|
||||
<entry name="!?*.form" />
|
||||
<entry name="!?*.class" />
|
||||
<entry name="!?*.groovy" />
|
||||
<entry name="!?*.scala" />
|
||||
<entry name="!?*.flex" />
|
||||
<entry name="!?*.kt" />
|
||||
<entry name="!?*.clj" />
|
||||
<entry name="!?*.aj" />
|
||||
</wildcardResourcePatterns>
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="false">
|
||||
<processorPath useClasspath="true" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
<component name="CopyrightManager" default="" />
|
||||
<component name="Encoding">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
<component name="EntryPointsManager">
|
||||
<entry_points version="2.0" />
|
||||
</component>
|
||||
<component name="GradleLocalSettings">
|
||||
<option name="modificationStamps">
|
||||
<map>
|
||||
<entry key="K:/GitHub/CompileOnlyPlugin" value="2933943731758" />
|
||||
<entry key="K:/ect/groovy/SshotCleaner" value="2892856534549" />
|
||||
<entry key="K:/ect/java/Captcha" value="2894636758390" />
|
||||
<entry key="K:/ect/java/FileSplitter" value="2846829504112" />
|
||||
<entry key="K:/ect/java/GZIPFilter" value="2894567636586" />
|
||||
<entry key="K:/ect/java/Lotto" value="2894619520256" />
|
||||
<entry key="K:/ect/java/SshotCleaner" value="1446415498070" />
|
||||
<entry key="K:/ect/java/TorrentCleaner" value="2894593616839" />
|
||||
<entry key="K:/ect/java/click" value="2894595659515" />
|
||||
<entry key="K:/ect/java/iFit2Workout" value="2894645931218" />
|
||||
<entry key="K:/imacination/jtalk" value="2865986493991" />
|
||||
<entry key="K:/java/DataProviderTest" value="2935655621669" />
|
||||
<entry key="K:/java/HttpStatus" value="2921271906937" />
|
||||
<entry key="K:/java/SemanticVersion" value="2905451385982" />
|
||||
<entry key="K:/java/mobibot" value="2865248599040" />
|
||||
<entry key="K:/java/semver" value="2921872379706" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="externalProjectsViewState">
|
||||
<projects_view />
|
||||
</option>
|
||||
</component>
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<option name="myLocal" value="true" />
|
||||
<inspection_tool class="FieldMayBeFinal" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INNER_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="METHOD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="FIELD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IGNORE_DEPRECATED" value="false" />
|
||||
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
|
||||
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
|
||||
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
|
||||
<option name="myAdditionalJavadocTags" value="created" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="LocalCanBeFinal" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="REPORT_VARIABLES" value="true" />
|
||||
<option name="REPORT_PARAMETERS" value="false" />
|
||||
<option name="REPORT_CATCH_PARAMETERS" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
|
||||
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="UnnecessarySemicolon" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WeakerAccess" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS" value="true" />
|
||||
<option name="SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES" value="false" />
|
||||
<option name="SUGGEST_PRIVATE_FOR_INNERS" value="false" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
<option name="PROJECT_PROFILE" value="Project Default" />
|
||||
<option name="USE_PROJECT_PROFILE" value="true" />
|
||||
<version value="1.0" />
|
||||
</component>
|
||||
<component name="KobaltSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<KobaltProjectSettings>
|
||||
<option name="autoDownloadKobalt" value="true" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.898" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</KobaltProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
<component name="MavenImportPreferences">
|
||||
<option name="generalSettings">
|
||||
<MavenGeneralSettings>
|
||||
<option name="mavenHome" value="Bundled (Maven 3)" />
|
||||
</MavenGeneralSettings>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectInspectionProfilesVisibleTreeState">
|
||||
<entry key="Project Default">
|
||||
<profile-state>
|
||||
<expanded-state>
|
||||
<State>
|
||||
<id />
|
||||
</State>
|
||||
<State>
|
||||
<id>Android Lint</id>
|
||||
</State>
|
||||
<State>
|
||||
<id>Java</id>
|
||||
</State>
|
||||
<State>
|
||||
<id>Portability issuesJava</id>
|
||||
</State>
|
||||
</expanded-state>
|
||||
</profile-state>
|
||||
</entry>
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||
<OptionsSetting value="true" id="Add" />
|
||||
<OptionsSetting value="true" id="Remove" />
|
||||
<OptionsSetting value="true" id="Checkout" />
|
||||
<OptionsSetting value="true" id="Update" />
|
||||
<OptionsSetting value="true" id="Status" />
|
||||
<OptionsSetting value="true" id="Edit" />
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/kobalt/Build.kt.iml" filepath="$PROJECT_DIR$/kobalt/Build.kt.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/gson-test.iml" filepath="$PROJECT_DIR$/gson-test.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.8.x" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/kobaltBuild/classes" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="GoToClass.includeLibraries" value="false" />
|
||||
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
|
||||
<property name="GoToFile.includeJavaFiles" value="false" />
|
||||
<property name="MemberChooser.sorted" value="false" />
|
||||
<property name="MemberChooser.showClasses" value="true" />
|
||||
<property name="MemberChooser.copyJavadoc" value="false" />
|
||||
<property name="settings.editor.selected.configurable" value="Errors" />
|
||||
<property name="settings.editor.splitter.proportion" value="0.2" />
|
||||
</component>
|
||||
<component name="RunManager">
|
||||
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
|
||||
<module name="" />
|
||||
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
|
||||
<option name="PROGRAM_PARAMETERS" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="Applet" factoryName="Applet">
|
||||
<option name="WIDTH" value="400" />
|
||||
<option name="HEIGHT" value="300" />
|
||||
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
|
||||
<module />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="Application" factoryName="Application">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PROGRAM_PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="" />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="JUnit" factoryName="JUnit">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<module name="" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="PACKAGE_NAME" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="METHOD_NAME" />
|
||||
<option name="TEST_OBJECT" value="class" />
|
||||
<option name="VM_PARAMETERS" value="-ea" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<envs />
|
||||
<patterns />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="Remote" factoryName="Remote">
|
||||
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||
<option name="SERVER_MODE" value="false" />
|
||||
<option name="SHMEM_ADDRESS" value="javadebug" />
|
||||
<option name="HOST" value="localhost" />
|
||||
<option name="PORT" value="5005" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="TestNG" factoryName="TestNG">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<module name="" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="SUITE_NAME" />
|
||||
<option name="PACKAGE_NAME" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="METHOD_NAME" />
|
||||
<option name="GROUP_NAME" />
|
||||
<option name="TEST_OBJECT" value="CLASS" />
|
||||
<option name="VM_PARAMETERS" value="-ea" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="OUTPUT_DIRECTORY" />
|
||||
<option name="ANNOTATION_TYPE" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<option name="USE_DEFAULT_REPORTERS" value="false" />
|
||||
<option name="PROPERTIES_FILE" />
|
||||
<envs />
|
||||
<properties />
|
||||
<listeners />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
||||
<component name="libraryTable">
|
||||
<library name="kobalt.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.898/kobalt/wrapper/kobalt-0.898.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.896/kobalt/wrapper/kobalt-0.896.jar!/" />
|
||||
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.897/kobalt/wrapper/kobalt-0.897.jar!/" />
|
||||
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.898/kobalt/wrapper/kobalt-0.898.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="KotlinJavaRuntime">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/lib/kotlin-runtime.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/kotlin-reflect.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/lib/kotlin-runtime-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
<component name="masterDetails">
|
||||
<states>
|
||||
<state key="ProjectJDKs.UI">
|
||||
<settings>
|
||||
<last-edited>1.8.x</last-edited>
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.19944212" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
</states>
|
||||
</component>
|
||||
</project>
|
11
kobalt/Build.kt.iml
Normal file
11
kobalt/Build.kt.iml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="kobalt.jar" level="project" />
|
||||
</component>
|
||||
</module>
|
43
kobalt/src/Build.kt
Normal file
43
kobalt/src/Build.kt
Normal file
|
@ -0,0 +1,43 @@
|
|||
import com.beust.kobalt.*
|
||||
import com.beust.kobalt.plugin.packaging.*
|
||||
import com.beust.kobalt.plugin.application.*
|
||||
import com.beust.kobalt.plugin.kotlin.*
|
||||
|
||||
val repos = repos()
|
||||
|
||||
|
||||
val p = project {
|
||||
|
||||
name = "gson-test"
|
||||
group = "com.example"
|
||||
artifactId = name
|
||||
version = "0.1"
|
||||
|
||||
sourceDirectories {
|
||||
path("src/main/kotlin")
|
||||
}
|
||||
|
||||
sourceDirectoriesTest {
|
||||
path("src/test/kotlin")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile("com.google.code.gson:gson:2.7")
|
||||
}
|
||||
|
||||
dependenciesTest {
|
||||
compile("org.testng:testng:")
|
||||
|
||||
}
|
||||
|
||||
assemble {
|
||||
jar {
|
||||
}
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass = "com.example.MainKt"
|
||||
}
|
||||
|
||||
|
||||
}
|
BIN
kobalt/wrapper/kobalt-wrapper.jar
Normal file
BIN
kobalt/wrapper/kobalt-wrapper.jar
Normal file
Binary file not shown.
1
kobalt/wrapper/kobalt-wrapper.properties
Normal file
1
kobalt/wrapper/kobalt-wrapper.properties
Normal file
|
@ -0,0 +1 @@
|
|||
kobalt.version=0.898
|
2
kobaltw
Normal file
2
kobaltw
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env sh
|
||||
java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $*
|
4
kobaltw.bat
Normal file
4
kobaltw.bat
Normal file
|
@ -0,0 +1,4 @@
|
|||
@echo off
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
java -jar "%DIRNAME%/kobalt/wrapper/kobalt-wrapper.jar" %*
|
BIN
lib/kotlin-reflect.jar
Normal file
BIN
lib/kotlin-reflect.jar
Normal file
Binary file not shown.
BIN
lib/kotlin-runtime-sources.jar
Normal file
BIN
lib/kotlin-runtime-sources.jar
Normal file
Binary file not shown.
BIN
lib/kotlin-runtime.jar
Normal file
BIN
lib/kotlin-runtime.jar
Normal file
Binary file not shown.
BIN
libs/gson-test-0.1.jar
Normal file
BIN
libs/gson-test-0.1.jar
Normal file
Binary file not shown.
17
src/main/kotlin/com/example/Main.kt
Normal file
17
src/main/kotlin/com/example/Main.kt
Normal file
|
@ -0,0 +1,17 @@
|
|||
package com.example
|
||||
|
||||
import com.example.models.ConfigObject
|
||||
import com.example.models.Container
|
||||
import com.google.gson.Gson
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
var json = "{ nodes: [ { item1: 'value1a', item2: 'value2a' }, { item1: 'value1b', item2: 'value2b' }, { item1: 'value1c', item2: 'value2c' } ] } "
|
||||
|
||||
val gson = Gson()
|
||||
val container: Container = gson.fromJson(json, Container::class.java)
|
||||
println(container)
|
||||
|
||||
json = "{ \"name\": \"DKS 1802-EPD\", \"star\": \"*\", \"hash\": \"#\", \"master\": 4, \"opts\": [ { \"title\": \"Delete 4-Digit Entry Code\", \"fields\": [ { \"hint\": \"Entry Code\", \"alpha\": false, \"max\": 4 } ], \"dial\": \"*14[MASTER],[FIELD:1]*\" }, { \"title\": \"Add 4-Digit Entry Code\", \"fields\": [ { \"hint\": \"Entry Code\", \"alpha\": false, \"max\": 4 } ], \"dial\": \"*02[MASTER],[FIELD:1]*\" }, { \"title\": \"Add Name\", \"fields\": [ { \"hint\": \"Directory Code\", \"alpha\": false, \"max\": 3 }, { \"hint\": \"Name\", \"alpha\": true, \"max\": 11 } ], \"dial\": \"*66[MASTER],[FIELD:1]*,[FIELD:2]*\" }, { \"title\": \"Add 7-digit Phone Number\", \"fields\": [ { \"hint\": \"Directory Code\", \"alpha\": false, \"max\": 3 }, { \"hint\": \"Phone Number\", \"alpha\": true, \"max\": 7 } ], \"dial\": \"*01[MASTER],[FIELD:1]*,[FIELD:2]*\" }, { \"title\": \"Set Time Clock\", \"fields\": [ { \"hint\": \"Hour & Minutes\", \"alpha\": false, \"max\": 4 }, { \"hint\": \"AM=0 PM=1\", \"alpha\": false, \"max\": 1 }, { \"hint\": \"Month\", \"alpha\": false, \"max\": 2 }, { \"hint\": \"Day of Month\", \"alpha\": false, \"max\": 2 }, { \"hint\": \"Year\", \"alpha\": false, \"max\": 2 }, { \"hint\": \"Day of Week (Sun=1, Mon=2..)\", \"alpha\": false, \"max\": 1 } ], \"dial\": \"*33[MASTER],[FIELD:1]*,[FIELD:2]*,[FIELD:3]*,[FIELD:4]*,[FIELD:5]*,[FILED:6]*\" } ] }"
|
||||
val config : ConfigObject = gson.fromJson(json, ConfigObject::class.java)
|
||||
println(config)
|
||||
}
|
20
src/main/kotlin/com/example/models/ConfigObject.kt
Normal file
20
src/main/kotlin/com/example/models/ConfigObject.kt
Normal file
|
@ -0,0 +1,20 @@
|
|||
package com.example.models
|
||||
|
||||
/**
|
||||
* The <code>ConfigObject</code> class.
|
||||
*
|
||||
* @author <a href="mailto:erik@thauvin.net">Erik C. Thauvin</a>
|
||||
* @created 2016-08-11
|
||||
* @since 1.0
|
||||
*/
|
||||
class ConfigObject {
|
||||
var name: String = ""
|
||||
var star: String = ""
|
||||
var hash: String = ""
|
||||
var master: Int = 0
|
||||
var opts: List<OptionObject> = emptyList()
|
||||
|
||||
override fun toString(): String {
|
||||
return "Config [name=$name, star=$star, hash=$hash, master=$master, opts=$opts]"
|
||||
}
|
||||
}
|
16
src/main/kotlin/com/example/models/Container.kt
Normal file
16
src/main/kotlin/com/example/models/Container.kt
Normal file
|
@ -0,0 +1,16 @@
|
|||
package com.example.models
|
||||
|
||||
/**
|
||||
* The <code>Container</code> class.
|
||||
*
|
||||
* @author <a href="mailto:erik@thauvin.net" target="_blank">Erik C. Thauvin</a>
|
||||
* @created 2016-08-12
|
||||
* @since 1.0
|
||||
*/
|
||||
class Container {
|
||||
val nodes : List<Node> = emptyList()
|
||||
|
||||
override fun toString(): String {
|
||||
return "Nodes [nodes=$nodes]"
|
||||
}
|
||||
}
|
18
src/main/kotlin/com/example/models/FieldObject.kt
Normal file
18
src/main/kotlin/com/example/models/FieldObject.kt
Normal file
|
@ -0,0 +1,18 @@
|
|||
package com.example.models
|
||||
|
||||
/**
|
||||
* The <code>FieldObject</code> class.
|
||||
*
|
||||
* @author <a href="mailto:erik@thauvin.net">Erik C. Thauvin</a>
|
||||
* @created 2016-08-11
|
||||
* @since 1.0
|
||||
*/
|
||||
class FieldObject {
|
||||
var hint: String = ""
|
||||
var alpha: Boolean = false
|
||||
var max: Int = 0
|
||||
|
||||
override fun toString(): String {
|
||||
return "Field [hint=$hint, alpha=$alpha, max=$max]"
|
||||
}
|
||||
}
|
17
src/main/kotlin/com/example/models/Node.kt
Normal file
17
src/main/kotlin/com/example/models/Node.kt
Normal file
|
@ -0,0 +1,17 @@
|
|||
package com.example.models
|
||||
|
||||
/**
|
||||
* The <code>Node</code> class.
|
||||
*
|
||||
* @author <a href="mailto:erik@thauvin.net" target="_blank">Erik C. Thauvin</a>
|
||||
* @created 2016-08-12
|
||||
* @since 1.0
|
||||
*/
|
||||
class Node {
|
||||
var item1: String = ""
|
||||
var item2: String = ""
|
||||
|
||||
override fun toString() : String {
|
||||
return "Node [item1=$item1, item2=$item2]"
|
||||
}
|
||||
}
|
18
src/main/kotlin/com/example/models/OptionObject.kt
Normal file
18
src/main/kotlin/com/example/models/OptionObject.kt
Normal file
|
@ -0,0 +1,18 @@
|
|||
package com.example.models
|
||||
|
||||
/**
|
||||
* The <code>OptionObject</code> class.
|
||||
*
|
||||
* @author <a href="mailto:erik@thauvin.net">Erik C. Thauvin</a>
|
||||
* @created 2016-08-11
|
||||
* @since 1.0
|
||||
*/
|
||||
class OptionObject {
|
||||
var title: String = ""
|
||||
var fields: List<FieldObject> = emptyList()
|
||||
var dial: String = ""
|
||||
|
||||
override fun toString(): String {
|
||||
return "Option [title=$title, fields=$fields, dial=$dial]"
|
||||
}
|
||||
}
|
8
src/test/kotlin/com/example/MainTest.kt
Normal file
8
src/test/kotlin/com/example/MainTest.kt
Normal file
|
@ -0,0 +1,8 @@
|
|||
package com.example
|
||||
|
||||
import org.testng.annotations.Test
|
||||
|
||||
class ExampleTest {
|
||||
@Test
|
||||
fun f() = println("Running test")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue