-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Showing
5 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
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,9 @@ | ||
### Kotlin Policy | ||
|
||
xDrip supports both Java and Kotlin source files. | ||
|
||
New class files in Java or Kotlin are accepted but there is no intention to convert existing Java files to Kotlin. | ||
|
||
Kotlin classes should be mindful to maintain as much java compatibility as possible where they may need to interact with existing classes. | ||
|
||
Overhead in terms of additional libraries and any performance related issues (such as threading and component lifecycle) should be carefully monitored. |
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
18 changes: 18 additions & 0 deletions
18
app/src/main/java/com/eveningoutpost/dexdrip/utils/framework/TestKot.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,18 @@ | ||
package com.eveningoutpost.dexdrip.utils.framework | ||
|
||
/** | ||
* JamOrHam | ||
* | ||
* Simple test to ensure compilation success | ||
*/ | ||
|
||
class TestKot { | ||
|
||
companion object { | ||
@JvmStatic | ||
fun compileOkay() : Boolean { | ||
return true; | ||
} | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
app/src/test/java/com/eveningoutpost/dexdrip/utils/framework/TestKotTest.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,14 @@ | ||
package com.eveningoutpost.dexdrip.utils.framework | ||
|
||
import org.junit.Assert.* | ||
|
||
import org.junit.Test | ||
|
||
class TestKotTest { | ||
|
||
@Test | ||
fun compileOkayTest() { | ||
assert(TestKot.compileOkay()) | ||
|
||
} | ||
} |
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