Skip to content

Commit

Permalink
Replace fb_native.prebuilt_jar with fb_prebuilt_jar
Browse files Browse the repository at this point in the history
Summary:
Replacing usage of the fb_native module with a wrapper that actually sets the
correct target configuration.  Necessary to get buck2 working with these rules,
otherwise they're unconfigured and buck2 doesn't know what to do with them.

Reviewed By: aniketmathur

Differential Revision: D34047826

fbshipit-source-id: 1f8f79d1866833349dafd16d9407bf4aa6913c03
  • Loading branch information
alexmalyshev authored and facebook-github-bot committed Feb 9, 2022
1 parent d02f667 commit c6b95f9
Show file tree
Hide file tree
Showing 30 changed files with 117 additions and 76 deletions.
8 changes: 5 additions & 3 deletions lib/androidx/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")

# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand Down Expand Up @@ -126,7 +128,7 @@ fb_native.remote_file(
url = "mvn:androidx.vectordrawable:vectordrawable:aar:1.1.0",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "androidx-annotations-jar",
binary_jar = ":androidx-annotations.jar",
)
Expand All @@ -137,7 +139,7 @@ fb_native.remote_file(
url = "mvn:androidx.annotation:annotation:jar:1.1.0",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "androidx-collection-jar",
binary_jar = ":androidx-collection.jar",
)
Expand Down Expand Up @@ -170,7 +172,7 @@ fb_native.remote_file(
url = "mvn:androidx.drawerlayout:drawerlayout:aar:1.0.0",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "androidx-lifecycle-common-jar",
binary_jar = ":androidx-lifecycle-common.jar",
)
Expand Down
12 changes: 7 additions & 5 deletions lib/asm/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")

# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -17,7 +19,7 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "asm-prebuilt",
binary_jar = ":asm.jar",
)
Expand All @@ -28,7 +30,7 @@ fb_native.remote_file(
url = "mvn:org.ow2.asm:asm:jar:7.0",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "asm-commons-prebuilt",
binary_jar = ":asm-commons.jar",
)
Expand All @@ -39,7 +41,7 @@ fb_native.remote_file(
url = "mvn:org.ow2.asm:asm-commons:jar:7.0",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "asm-util-prebuilt",
binary_jar = ":asm-util.jar",
)
Expand All @@ -50,7 +52,7 @@ fb_native.remote_file(
url = "mvn:org.ow2.asm:asm-util:jar:7.0",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "asm-tree-prebuilt",
binary_jar = ":asm-tree.jar",
)
Expand All @@ -61,7 +63,7 @@ fb_native.remote_file(
url = "mvn:org.ow2.asm:asm-tree:jar:7.0",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "asm-analysis-prebuilt",
binary_jar = ":asm-analysis.jar",
)
Expand Down
4 changes: 3 additions & 1 deletion lib/assertj/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")

# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -13,7 +15,7 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "assertj-core-prebuilt",
binary_jar = ":assertj-core.jar",
)
Expand Down
4 changes: 3 additions & 1 deletion lib/bcprov-jdk16/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")

# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -13,7 +15,7 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "bcprov-jdk16-prebuilt",
binary_jar = ":bcprov-jdk16.jar",
)
Expand Down
6 changes: 4 additions & 2 deletions lib/byte-buddy/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")

# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -14,7 +16,7 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "byte-buddy-prebuilt",
binary_jar = ":byte-buddy.jar",
)
Expand All @@ -25,7 +27,7 @@ fb_native.remote_file(
url = "mvn:net.bytebuddy:byte-buddy:jar:1.9.10",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "byte-buddy-agent-prebuilt",
binary_jar = ":byte-buddy-agent.jar",
)
Expand Down
3 changes: 2 additions & 1 deletion lib/commons-cli/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")
# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -6,7 +7,7 @@
load("//tools/build_defs/oss:fb_native_wrapper.bzl", "fb_native")
load("//tools/build_defs/oss:litho_defs.bzl", "LITHO_VISIBILITY")

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "commons-cli",
binary_jar = ":commons-cli.jar",
visibility = LITHO_VISIBILITY,
Expand Down
4 changes: 3 additions & 1 deletion lib/compile-testing/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")

# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -16,7 +18,7 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "compile-testing-prebuilt",
binary_jar = ":compile-testing.jar",
visibility = LITHO_VISIBILITY,
Expand Down
3 changes: 2 additions & 1 deletion lib/diff-utils/BUCK
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")
load("//tools/build_defs/oss:fb_native_wrapper.bzl", "fb_native")

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "diff-utils",
binary_jar = ":diff-utils.jar",
visibility = ["PUBLIC"],
Expand Down
12 changes: 4 additions & 8 deletions lib/fb/android-all/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
# LICENSE file in the root directory of this source tree.
load("//tools/build_defs/oss:fb_native_wrapper.bzl", "fb_native")
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")
load("//tools/build_defs/oss:litho_defs.bzl", "LITHO_VISIBILITY", "fb_java_library")

fb_java_library(
Expand All @@ -27,17 +23,17 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "shadows-core-16-jar",
binary_jar = "shadows-core-3.0-16.jar",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "shadows-framework-41-jar",
binary_jar = "shadows-framework-4.1.jar",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "android-all-5.0.0",
binary_jar = "android-all-5.0.0_r2-robolectric-1.jar",
visibility = LITHO_VISIBILITY,
Expand Down
3 changes: 2 additions & 1 deletion lib/fresco/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")
# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand Down Expand Up @@ -65,7 +66,7 @@ fb_native.remote_file(
url = "mvn:com.facebook.fresco:imagepipeline:aar:1.10.0",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "bolts",
binary_jar = ":bolts-tasks.jar",
visibility = LITHO_VISIBILITY,
Expand Down
3 changes: 2 additions & 1 deletion lib/guava/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")
load("//tools/build_defs/oss:fb_native_wrapper.bzl", "fb_native")
load("//tools/build_defs/oss:litho_defs.bzl", "fb_java_library")

Expand All @@ -9,7 +10,7 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "guava-prebuilt",
binary_jar = ":guava.jar",
)
Expand Down
6 changes: 4 additions & 2 deletions lib/hamcrest/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")

# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -14,7 +16,7 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "hamcrest-core",
binary_jar = ":hamcrest-core.jar",
)
Expand All @@ -25,7 +27,7 @@ fb_native.remote_file(
url = "mvn:org.hamcrest:hamcrest-core:jar:1.3",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "hamcrest-library",
binary_jar = ":hamcrest-library.jar",
)
Expand Down
3 changes: 2 additions & 1 deletion lib/infer-annotations/BUCK
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")
# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
# LICENSE file in the root directory of this source tree.

load("//tools/build_defs/oss:fb_native_wrapper.bzl", "fb_native")

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "infer-annotations",
binary_jar = ":infer-annotations.jar",
visibility = [
Expand Down
3 changes: 2 additions & 1 deletion lib/javapoet/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")
# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -6,7 +7,7 @@
load("//tools/build_defs/oss:fb_native_wrapper.bzl", "fb_native")
load("//tools/build_defs/oss:litho_defs.bzl", "LITHO_VISIBILITY")

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "javapoet",
binary_jar = ":javapoet.jar",
visibility = LITHO_VISIBILITY,
Expand Down
3 changes: 2 additions & 1 deletion lib/jsr-305/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")
# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -6,7 +7,7 @@
load("//tools/build_defs/oss:fb_native_wrapper.bzl", "fb_native")
load("//tools/build_defs/oss:litho_defs.bzl", "LITHO_VISIBILITY")

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "jsr-305",
binary_jar = ":jsr-305.jar",
visibility = LITHO_VISIBILITY,
Expand Down
4 changes: 3 additions & 1 deletion lib/junit/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")

# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -14,7 +16,7 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "junit-prebuilt",
binary_jar = ":junit.jar",
visibility = ["PUBLIC"],
Expand Down
7 changes: 4 additions & 3 deletions lib/kotlin/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")
# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -15,7 +16,7 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "kotlin-stdlib",
binary_jar = ":kotlin-stdlib.jar",
visibility = LITHO_VISIBILITY,
Expand All @@ -27,7 +28,7 @@ fb_native.remote_file(
url = "mvn:org.jetbrains.kotlin:kotlin-stdlib:jar:1.3.50",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "kotlin-stdlib-jdk7",
binary_jar = ":kotlin-stdlib-jdk7.jar",
visibility = LITHO_VISIBILITY,
Expand All @@ -39,7 +40,7 @@ fb_native.remote_file(
url = "mvn:org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.3.50",
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "jetbrains-annotations",
binary_jar = ":annotations.jar",
visibility = LITHO_VISIBILITY,
Expand Down
4 changes: 3 additions & 1 deletion lib/mockito/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")

# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -14,7 +16,7 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "mockito-core-prebuilt",
binary_jar = ":mockito-core.jar",
)
Expand Down
4 changes: 3 additions & 1 deletion lib/mockito2/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")

# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -15,7 +17,7 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "mockito-core-prebuilt",
binary_jar = ":mockito-core.jar",
)
Expand Down
4 changes: 3 additions & 1 deletion lib/objenesis/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@fbsource//tools/build_defs/android:fb_prebuilt_jar.bzl", "fb_prebuilt_jar")

# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
Expand All @@ -13,7 +15,7 @@ fb_java_library(
],
)

fb_native.prebuilt_jar(
fb_prebuilt_jar(
name = "objenesis-prebuilt",
binary_jar = ":objenesis.jar",
)
Expand Down
Loading

0 comments on commit c6b95f9

Please sign in to comment.