Compare commits
5 Commits
1.0-SNAPSH
...
master
Author | SHA1 | Date | |
---|---|---|---|
Sambo Chea | 8ec6027bf7 | ||
Sambo Chea | cf94913aea | ||
Sambo Chea | b9fb24efb5 | ||
Sambo Chea | 2bcd46b73c | ||
Sambo Chea | dd9c4f260c |
|
@ -0,0 +1,19 @@
|
|||
### Sample Module Gradle
|
||||
|
||||
[![](https://jitpack.io/v/com.cubetiqs.git.CUBETIQ/sample-module-gradle.svg)](https://jitpack.io/#com.cubetiqs.git.CUBETIQ/sample-module-gradle)
|
||||
|
||||
#### Gradle
|
||||
<b>Step 1</b>. Add the JitPack repository to your build file.
|
||||
```groovy
|
||||
allprojects {
|
||||
repositories {
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
}
|
||||
```
|
||||
<b>Step 2</b>. Add the dependency.
|
||||
```groovy
|
||||
dependencies {
|
||||
implementation 'com.cubetiqs.git.CUBETIQ:sample-module-gradle:0.0.1-SNAPSHOT'
|
||||
}
|
||||
```
|
|
@ -1,2 +1 @@
|
|||
rootProject.name = 'sample-module-gradle'
|
||||
|
||||
rootProject.name = 'sample-module-gradle'
|
|
@ -10,6 +10,16 @@ public class Print {
|
|||
public static final String ID = "PRINT";
|
||||
|
||||
public static void print(String message) {
|
||||
System.out.print(ID + " : " + message);
|
||||
}
|
||||
|
||||
public static void println(String message) {
|
||||
System.out.println(ID + " : " + message);
|
||||
}
|
||||
}
|
||||
|
||||
class Main {
|
||||
public static void main(String[] args) {
|
||||
Print.print("Hello");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.cubetiqs.util;
|
||||
|
||||
/**
|
||||
* String util helper
|
||||
*
|
||||
* @author sombochea
|
||||
* @since 1.0
|
||||
*/
|
||||
public final class StringHelper {
|
||||
public static String getOrDefault(String text, String fallback) {
|
||||
if (text == null || text.isEmpty()) {
|
||||
return fallback;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
public static String getOrEmpty(String text) {
|
||||
return getOrDefault(text, "");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user