aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidResourcesInfoApi.java
diff options
context:
space:
mode:
authorGravatar asteinb <asteinb@google.com>2018-05-29 08:05:47 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-05-29 08:07:24 -0700
commit6ee1a8184bd2afd21da7c96359d202ad43d32264 (patch)
tree3ed8cb769676e63fd51f646fa3ea82d93601ef3f /src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidResourcesInfoApi.java
parent7fcbc8ffdead028d19606fefa2fa3be13781da98 (diff)
Move Android data info classes to skylarkbuildapi
Expose all Android data info classes as interfaces in skylarkbuildapi. Most methods are not exposed in the interface since they are not exposed in Skylark. In fact, stop exposing a few methods from AndroidResourcesInfo that are exposed but shouldn't be. RELNOTES: none PiperOrigin-RevId: 198396677
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidResourcesInfoApi.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidResourcesInfoApi.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidResourcesInfoApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidResourcesInfoApi.java
new file mode 100644
index 0000000000..67523c1471
--- /dev/null
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidResourcesInfoApi.java
@@ -0,0 +1,35 @@
+// Copyright 2018 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+package com.google.devtools.build.lib.skylarkbuildapi.android;
+
+import com.google.devtools.build.lib.skylarkbuildapi.FileApi;
+import com.google.devtools.build.lib.skylarkbuildapi.StructApi;
+import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
+import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
+import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
+
+/** A provider that supplies resource information from its transitive closure. */
+@SkylarkModule(
+ name = "AndroidResourcesInfo",
+ doc = "Android resources provided by a rule",
+ category = SkylarkModuleCategory.PROVIDER)
+public interface AndroidResourcesInfoApi extends StructApi {
+
+ /** Returns the r.txt file for the target. */
+ @SkylarkCallable(
+ name = "r_txt",
+ doc = "Returns the R.txt file for the target.",
+ structField = true)
+ FileApi getRTxt();
+}