# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
import("//third_party/jni_zero/jni_zero.gni")
generate_jni("core_jni") {
sources = [
"java/src/org/chromium/components/commerce/core/DiscountInfo.java",
"java/src/org/chromium/components/commerce/core/ShoppingService.java",
]
}
android_library("core_java") {
sources = [
"java/src/org/chromium/components/commerce/core/CommerceSubscription.java",
"java/src/org/chromium/components/commerce/core/DiscountInfo.java",
"java/src/org/chromium/components/commerce/core/ShoppingService.java",
"java/src/org/chromium/components/commerce/core/SubscriptionsObserver.java",
]
deps = [
"//base:base_java",
"//build/android:build_java",
"//components/bookmarks/common/android:bookmarks_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/jni_zero:jni_zero_java",
"//url:gurl_java",
]
srcjar_deps = [
":core_jni",
":java_enum_srcjar",
]
}
java_cpp_enum("java_enum_srcjar") {
sources = [
"//components/commerce/core/commerce_types.h",
"//components/commerce/core/subscriptions/commerce_subscription.h",
]
}
robolectric_library("junit_tests") {
sources = [ "junit/src/org/chromium/components/commerce/core/CommerceSubscriptionTest.java" ]
deps = [
":core_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//build/android:build_java",
"//third_party/junit",
]
}