This file contains hidden or 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
//TestApplicaiton.kt | |
fun main(args: Array<String>) { | |
val application = Application.createSpringApplication() | |
application.addInitializers(AbstractIntegrationTest.Initializer()) | |
application.run(*args) | |
} | |
//AbstratIntegrationTest.kt | |
import org.junit.runner.RunWith | |
import org.springframework.boot.test.context.SpringBootTest |
This file contains hidden or 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
//lazy singleton | |
object Singleton { | |
class Something | |
val INSTANCE by lazy { Something() } | |
} | |
// filtering positive integers |
This file contains hidden or 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
// Initialization-on-demand holder implementation of a lazy singleton | |
public class Something { | |
private Something() {} | |
private static class LazyHolder { | |
static final Something INSTANCE = new Something(); | |
} | |
public static Something getInstance() { |
This file contains hidden or 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
import jetbrains.buildServer.configs.kotlin.v2019_2.* | |
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script | |
import jetbrains.buildServer.configs.kotlin.v2019_2.vcs.GitVcsRoot | |
version = "2019.2" | |
project { | |
vcsRoot(ProjectVcs) | |
buildType(BuildA) |
This file contains hidden or 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
version = "2019.2" | |
project { | |
vcsRoot(ProjectVcs) | |
buildType(Build) | |
template(MyTemplate) | |
} | |
object Build : BuildType({ |
This file contains hidden or 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
// from https://twitter.com/ZacSweers/status/1199224945072623616 | |
typealias NickName = JvmName | |
typealias MakeDaggerHappy = JvmSuppressWildcards | |
typealias ConfuseDagger = JvmWildcard | |
typealias MaybeThreadSafe = Volatile | |
typealias MaybeThreadSafeButFun = Synchronized | |
typealias MakeDaggerHappy2 = JvmStatic | |
typealias AutoConvertedJavaStuff = Throws | |
typealias NoTouchy = JvmSynthetic |
This file contains hidden or 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
<properties> | |
<component.branch/> | |
</properties> | |
<dependency> | |
<groupId>org.arhan</groupId> | |
<artifactId>component</artifactId> | |
<version>1.0${component.branch}-SNAPSHOT</version> | |
</dependency> |
This file contains hidden or 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
<properties> | |
<project.vcs.branch/> | |
</properties> |
This file contains hidden or 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
<plugin> | |
<artifactId>maven-jar-plugin</artifactId> | |
<version>3.1.0</version> | |
<executions> | |
<execution> | |
<phase>package</phase> | |
<goals> | |
<goal>jar</goal> | |
</goals> | |
<configuration> |
This file contains hidden or 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
<plugin> | |
<version>2.8.2</version> | |
<artifactId>maven-deploy-plugin</artifactId> | |
<executions> | |
<execution> | |
<phase>deploy</phase> | |
<goals> | |
<goal>deploy</goal> | |
</goals> | |
</execution> |