Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
8ec6027bf7 | |||
cf94913aea | |||
b9fb24efb5 | |||
2bcd46b73c | |||
dd9c4f260c |
19
README.md
Normal file
19
README.md
Normal file
@ -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");
|
||||
}
|
||||
}
|
20
src/main/java/com/cubetiqs/util/StringHelper.java
Normal file
20
src/main/java/com/cubetiqs/util/StringHelper.java
Normal file
@ -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