Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit 530090b

Browse files
author
sstiliatis
committed
Initial commit
0 parents  commit 530090b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1397
-0
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx

.idea/codeStyles/Project.xml

Lines changed: 122 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 109 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

annotations/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

annotations/build.gradle

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apply plugin: 'java-library'
2+
apply plugin: 'kotlin'
3+
4+
dependencies {
5+
implementation fileTree(dir: 'libs', include: ['*.jar'])
6+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
7+
implementation 'com.google.code.gson:gson:2.8.6'
8+
}
9+
10+
sourceCompatibility = "7"
11+
targetCompatibility = "7"
12+
13+
repositories {
14+
mavenCentral()
15+
}
16+
compileKotlin {
17+
kotlinOptions {
18+
jvmTarget = "1.8"
19+
}
20+
}
21+
compileTestKotlin {
22+
kotlinOptions {
23+
jvmTarget = "1.8"
24+
}
25+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.codeblin.annotations
2+
3+
@Retention(AnnotationRetention.SOURCE)
4+
@Target(AnnotationTarget.CLASS)
5+
annotation class Document(val name: String = "")
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.codeblin.annotations
2+
3+
import com.google.gson.Gson
4+
import com.google.gson.reflect.TypeToken
5+
6+
class GsonWrapper {
7+
val gson = Gson()
8+
9+
inline fun <reified T>getJsonString(value: T) = gson.toJson(value, T::class.java)
10+
11+
inline fun <reified T>getObject(value: String) = gson.fromJson(value, T::class.java)
12+
13+
inline fun <reified T>getList(value: String) = gson.fromJson<List<T>>(value, getItemType<T>())
14+
15+
inline fun <T>getItemType() = object : TypeToken<List<T>>() {}.type
16+
}

0 commit comments

Comments
 (0)