-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yuriel
committed
Nov 11, 2016
1 parent
17365fd
commit 87f3cb3
Showing
7 changed files
with
76 additions
and
4 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
components/src/main/kotlin/com/exyui/android/debugbottle/components/DTEnv.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.exyui.android.debugbottle.components | ||
|
||
/** | ||
* Created by yuriel on 11/11/16. | ||
*/ | ||
@Suppress("unused") | ||
object DTEnv { | ||
|
||
@JvmStatic val ENV = Env.DEBUG | ||
@JvmStatic val VERSION_CODE = BuildConfig.VERSION_CODE | ||
@JvmStatic val VERSION_NAME = BuildConfig.VERSION_NAME | ||
|
||
@JvmStatic fun isDebug() = ENV == Env.DEBUG | ||
@JvmStatic fun isRelease() = ENV == Env.RELEASE | ||
@JvmStatic fun isTest() = ENV == Env.TEST | ||
|
||
enum class Env { | ||
DEBUG, RELEASE, TEST | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
noop-java/src/main/java/com/exyui/android/debugbottle/components/DTEnv.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.exyui.android.debugbottle.components; | ||
|
||
import com.exyui.android.debugbottle.BuildConfig; | ||
|
||
/** | ||
* Created by yuriel on 11/11/16. | ||
*/ | ||
|
||
@SuppressWarnings("unused") | ||
final public class DTEnv { | ||
public static final Env ENV = Env.RELEASE; | ||
public static final int VERSION_CODE = BuildConfig.VERSION_CODE; | ||
public static final String VERSION_NAME = BuildConfig.VERSION_NAME; | ||
|
||
public static Boolean isDebug() { | ||
return ENV == Env.DEBUG; | ||
} | ||
|
||
public static Boolean isRelease() { | ||
return ENV == Env.RELEASE; | ||
} | ||
|
||
public static Boolean isTest() { | ||
return ENV == Env.TEST; | ||
} | ||
|
||
public enum Env { | ||
DEBUG, RELEASE, TEST | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
noop-kotlin/src/main/kotlin/com/exyui/android/debugbottle/components/DTEnv.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.exyui.android.debugbottle.components | ||
|
||
import com.exyui.android.debugbottle.BuildConfig | ||
|
||
/** | ||
* Created by yuriel on 11/11/16. | ||
*/ | ||
@Suppress("unused") | ||
object DTEnv { | ||
|
||
@JvmStatic val ENV = Env.RELEASE | ||
@JvmStatic val VERSION_CODE = BuildConfig.VERSION_CODE | ||
@JvmStatic val VERSION_NAME = BuildConfig.VERSION_NAME | ||
|
||
@JvmStatic fun isDebug() = ENV == Env.DEBUG | ||
@JvmStatic fun isRelease() = ENV == Env.RELEASE | ||
@JvmStatic fun isTest() = ENV == Env.TEST | ||
|
||
enum class Env { | ||
DEBUG, RELEASE, TEST | ||
} | ||
} |