Skip to content
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

Rename databinding kotlin to use the same suffix as kt_android_library #122

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/android/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ android_library(
"src/main/java/**/*.kt",
]),
custom_package = "com.grab.test",
enable_data_binding = True,
manifest = "src/main/AndroidManifest.xml",
resources = {
"src/main/res": {
Expand Down
42 changes: 23 additions & 19 deletions tests/android/src/main/res/layout/layout_test.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">

<TextView
android:id="@+id/text"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center" />
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">

<TextView
android:id="@+id/text2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<TextView
android:id="@+id/text2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center" />

</LinearLayout>
</LinearLayout>
</layout>
2 changes: 1 addition & 1 deletion tools/databinding/databinding.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def kt_db_android_library(
)

# Create an intermediate target for compiling all Kotlin classes used in Databinding
kotlin_target = name + "-kotlin"
kotlin_target = name + "_kt"
kotlin_targets = []

# List for holding binding adapter sources
Expand Down
1 change: 1 addition & 0 deletions workspace_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ GRAB_BAZEL_COMMON_ARTIFACTS = [
"org.jetbrains.kotlin:kotlin-parcelize-compiler:1.8.10",
"org.jetbrains.kotlin:kotlin-parcelize-runtime:1.8.10",
"androidx.compose.compiler:compiler:1.4.3",
"androidx.annotation:annotation:1.5.0",
"androidx.databinding:databinding-adapters:7.2.2",
"androidx.databinding:databinding-common:7.2.2",
"androidx.databinding:databinding-runtime:7.2.2",
Expand Down