Skip to content

Instantly share code, notes, and snippets.

@jmmk

jmmk/App.kt Secret

Last active February 13, 2018 05:48
Show Gist options
  • Save jmmk/0d73714ffec4efefbe0d0b1858a783df to your computer and use it in GitHub Desktop.
Save jmmk/0d73714ffec4efefbe0d0b1858a783df to your computer and use it in GitHub Desktop.
bazel kotlin deps
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
class MyApp {
val mapper = jacksonObjectMapper()
}
fun main(args: Array<String>) {
println("Hello World")
}
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_binary")
kt_jvm_binary(
name = "main",
main_class = "AppKt",
srcs = ["App.kt"],
deps = [
"@jackson//:compile",
],
)
bazel run //:main
git_repository(
name = "io_bazel_rules_kotlin",
remote = "https://github.com/bazelbuild/rules_kotlin.git",
commit = "84a9721aca096dc71b4668f93efa94f6761afced",
)
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kotlin_repositories")
kotlin_repositories(kotlin_release_version = "1.2.21")
git_repository(
name = 'org_pubref_rules_maven',
remote = 'https://github.com/pubref/rules_maven',
commit = '9c3b07a6d9b195a1192aea3cd78afd1f66c80710',
)
load('@org_pubref_rules_maven//maven:rules.bzl', 'maven_repositories')
maven_repositories()
load('@org_pubref_rules_maven//maven:rules.bzl', 'maven_repository')
maven_repository(
name = 'jackson',
deps = [
"com.fasterxml.jackson.module:jackson-module-kotlin:2.9.2",
],
transitive_deps = [
'07c10d545325e3a6e72e06381afe469fd40eb701:com.fasterxml.jackson.core:jackson-annotations:2.9.0',
'aed20e50152a2f19adc1995c8d8f307c7efa414d:com.fasterxml.jackson.core:jackson-core:2.9.2',
'1d8d8cb7cf26920ba57fb61fa56da88cc123b21f:com.fasterxml.jackson.core:jackson-databind:2.9.2',
'a9cf72ae68a641ade45c400b6cec2d363818f11b:com.fasterxml.jackson.module:jackson-module-kotlin:2.9.2',
'919f0dfe192fb4e063e7dacadee7f8bb9a2672a9:org.jetbrains:annotations:13.0',
'bfc9458443666b1be1d66813f3a90a03afa30730:org.jetbrains.kotlin:kotlin-reflect:1.1.3',
'e51ebc59da5103a2052859e89682c7f9c3456298:org.jetbrains.kotlin:kotlin-stdlib:1.1.3',
],
)
load('@jackson//:rules.bzl', 'jackson_compile')
jackson_compile()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment