From 2346c96999a98877a94c802d673a40f7f8cb17ee Mon Sep 17 00:00:00 2001 From: hlq07 Date: Wed, 9 May 2018 14:21:14 +0800 Subject: [PATCH] create --- .gitignore | 19 ++++++ app/.gitignore | 1 + app/build.gradle | 5 ++ app/src/main/java/org/cutem/SampleMain.java | 20 ++++++ app/src/main/resources/res/holiday.json | 62 +++++++++++++++++++ .../test/java/org/cutem/SampleMainTest.java | 21 +++++++ build.gradle | 14 +++++ settings.gradle | 1 + 8 files changed, 143 insertions(+) create mode 100644 .gitignore create mode 100644 app/.gitignore create mode 100644 app/build.gradle create mode 100644 app/src/main/java/org/cutem/SampleMain.java create mode 100644 app/src/main/resources/res/holiday.json create mode 100644 app/src/test/java/org/cutem/SampleMainTest.java create mode 100644 build.gradle create mode 100644 settings.gradle diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b2f80b --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +# Java class files +*.class + +# Generated files +build/ +out/ + +# Gradle files +.gradle/ +gradle/ +gradlew +gradlew.bat + +# Intellij +*.iml +.idea/ + +# Log Files +*.log diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..d163863 --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +build/ \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..b8d3649 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,5 @@ + +dependencies { + testCompile group: 'junit', name: 'junit', version: '4.12' + compile 'com.google.code.gson:gson:2.8.4' +} diff --git a/app/src/main/java/org/cutem/SampleMain.java b/app/src/main/java/org/cutem/SampleMain.java new file mode 100644 index 0000000..2d2ce91 --- /dev/null +++ b/app/src/main/java/org/cutem/SampleMain.java @@ -0,0 +1,20 @@ +package org.cutem; + +/** + * a sample class + * + * @author hlq07 + */ +public class SampleMain { + + + /** + * main method + * + * @param args cmd line arguments + */ + public static void main(String[] args) { + System.out.println("hello world"); + } + +} diff --git a/app/src/main/resources/res/holiday.json b/app/src/main/resources/res/holiday.json new file mode 100644 index 0000000..1b4b852 --- /dev/null +++ b/app/src/main/resources/res/holiday.json @@ -0,0 +1,62 @@ +{ + "year": "2018", + "holiday": [ + { + "name": "yuandan", + "zh_name": "元旦", + "holiday_time": "2018-01-01", + "start_time": "2018-01-01", + "end_time": "2018-01-01" + }, + { + "name": "chunjie", + "zh_name": "春节", + "holiday_time": "2018-02-16", + "start_time": "2018-02-15", + "end_time": "2018-02-21" + }, + { + "name": "qingming", + "zh_name": "清明节", + "holiday_time": "2018-04-05", + "start_time": "2018-04-05", + "end_time": "2018-04-07" + }, + { + "name": "laodong", + "zh_name": "劳动节", + "holiday_time": "2018-05-01", + "start_time": "2018-04-29", + "end_time": "2018-05-01" + }, + { + "name": "duanwu", + "zh_name": "端午节", + "holiday_time": "2018-06-18", + "start_time": "2018-06-16", + "end_time": "2018-06-18" + }, + { + "name": "zhongqiu", + "zh_name": "中秋节", + "holiday_time": "2018-09-24", + "start_time": "2018-09-22", + "end_time": "2018-09-24" + }, + { + "name": "guoqing", + "zh_name": "国庆节", + "holiday_time": "2018-10-01", + "start_time": "2018-10-01", + "end_time": "2018-10-07" + } + ], + "workday": [ + "2018-02-11", + "2018-02-24", + "2018-04-08", + "2018-04-28", + "2018-09-29", + "2018-09-30" + ] +} diff --git a/app/src/test/java/org/cutem/SampleMainTest.java b/app/src/test/java/org/cutem/SampleMainTest.java new file mode 100644 index 0000000..3c6b95e --- /dev/null +++ b/app/src/test/java/org/cutem/SampleMainTest.java @@ -0,0 +1,21 @@ +package org.cutem; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class SampleMainTest { + + @Before + public void setUp() { + } + + @After + public void tearDown() { + } + + @Test + public void main() { + SampleMain.main(new String[]{"nihao"}); + } +} \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..ea06227 --- /dev/null +++ b/build.gradle @@ -0,0 +1,14 @@ +subprojects { + apply plugin: 'java' + sourceCompatibility = 1.8 + javadoc.options.locale "en_US" + + repositories { + jcenter() + } +} + +allprojects { + group = "org.cutem" + version = "1.0.0.lab4" +} diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..e7b4def --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +include ':app'