New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add `kotlin_android_library` macro #32

Merged
merged 3 commits into from Sep 8, 2017
Jump to file or symbol
Failed to load files and symbols.
+9 −2
Diff settings

Always

Just for now

Viewing a subset of changes. View all
Prev

Fix duplicated deps arguments in _res rule

  • Loading branch information...
fishy committed Sep 8, 2017
commit d8efadbd024b321fd881035d207fd2bdc7f30602
View
@@ -179,6 +179,7 @@ kotlin_compile = rule(
def kotlin_android_library(
name,
srcs = [],
deps = [],
java_deps = [],
aar_deps = [],
resource_files = [],
@@ -198,7 +199,7 @@ def kotlin_android_library(
deps = aar_deps + java_deps,
**kwargs
)
res_deps += [name + "_res"]
res_deps.append(name + "_res")
native.android_library(
name = name + "_aar",
@@ -217,6 +218,7 @@ def kotlin_android_library(
kotlin_compile(
name = name + "_compile",
srcs = srcs,
deps = deps,
java_deps = java_deps + [
name + "_sdk",
name + "_aar",
@@ -225,10 +227,15 @@ def kotlin_android_library(
**kwargs
)
# Convert kotlin deps into java deps
kt_deps = []
for dep in deps:
kt_deps.append(dep + "_kt")
native.java_import(
name = name + "_kt",
jars = [name + "_compile.jar"],
deps = java_deps,
deps = kt_deps + java_deps,
visibility = visibility,
exports = [
"@com_github_jetbrains_kotlin//:runtime",
ProTip! Use n and p to navigate between commits in a pull request.