diff --git a/.bazelci/tutorials.yml b/.bazelci/tutorials.yml index abb918132..ef1e22efd 100644 --- a/.bazelci/tutorials.yml +++ b/.bazelci/tutorials.yml @@ -1,27 +1,5 @@ # Getting started tutorials tasks: - tutorial-linux: - name: "Bazel end-to-end example" - platform: ubuntu1804 - working_directory: ../tutorial - build_targets: - - "//backend" - - "//android" - tutorial-macos: - name: "Bazel end-to-end example" - platform: macos - working_directory: ../tutorial - build_targets: - - "//backend" - - "//android" - - "//ios-app" - tutorial-windows: - name: "Bazel end-to-end example" - platform: windows - working_directory: ../tutorial - build_targets: - - "//backend" - - "//android" cpp-stage1-linux: name: "C++ Stage 1" platform: ubuntu1804 diff --git a/tutorial/.bazelrc b/tutorial/.bazelrc deleted file mode 100644 index 6b1323ffd..000000000 --- a/tutorial/.bazelrc +++ /dev/null @@ -1,6 +0,0 @@ -# required for ios-app - -build --enable_platform_specific_config -build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain -build:macos --crosstool_top=@local_config_apple_cc//:toolchain -build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain diff --git a/tutorial/BUILD b/tutorial/BUILD deleted file mode 100644 index 747a316e7..000000000 --- a/tutorial/BUILD +++ /dev/null @@ -1,23 +0,0 @@ -config_setting( - name = "darwin", - values = {"cpu": "darwin"}, - visibility = ["//visibility:public"], -) - -config_setting( - name = "darwin_x86_64", - values = {"cpu": "darwin_x86_64"}, - visibility = ["//visibility:public"], -) - -filegroup( - name = "all", - srcs = [ - "//android", - "//backend", - ] + select({ - ":darwin": ["//ios-app"], - ":darwin_x86_64": ["//ios-app"], - "//conditions:default": [], - }), -) diff --git a/tutorial/README.md b/tutorial/README.md deleted file mode 100644 index 9b87a2302..000000000 --- a/tutorial/README.md +++ /dev/null @@ -1,78 +0,0 @@ -Bazel end-to-end example -======================== - -This is a "hello world" example that uses a variety of Bazel features. There is -a backend server and a couple of front-end applications that use this backend, -including: - -* an [Android application](#android-application) -* an [iOS application](#ios-application) - -To build these examples, you will need to -[install Bazel](http://bazel.io/docs/install.html). - -The backend ------------ - -The backend server listens for requests to localhost:8080 and replies with a -JSON string: `{'requested' : '/my-page'}` (or whatever the URI was that you -visited). - -You can build and run this server by running: - -``` -$ bazel build //backend -$ bazel-bin/backend/backend -``` - -The backend server uses the AppEngine SDK to run a local webserver. The first -time you build this target, it will download the entire SDK (~160MB), which -may take a little while. (After that first build, it should be cached.) - -Once the `bazel-bin/backend/backend` prints -`INFO: Dev App Server is now running`, you can visit any URI relative to -localhost:8080 and get a response from the server. - -Android application -------------------- - -The Android application has one activity, which retrieves the `'requested'` key -of the JSON object retrieved from the URL http://10.0.2.2:8080/boop and displays -it on the screen. - -In order to build the Android application, you will need to download the SDK at -https://developer.android.com/sdk/installing/index.html?pkg=tools and install -the Android SDK and build tools as described in 1. Get the latest SDK tools in -https://developer.android.com/sdk/installing/adding-packages.html. -Once these are done, set up the android_sdk_repository rule in the WORKSPACE file, -following the instructions in the comments there. - -You can build and install this application by connecting an Android emulator or -device via adb and running: - -``` -$ bazel mobile-install //android -``` - -iOS application ---------------- - -The iOS application is a single view which retrives the contents of the HTTP -response received for a given URL (such as localhost:8080). It displays the -response in a text view. - -You can build the application by running: - -``` -$ bazel build //ios-app -``` - -Bazel will generate some output files, most notably `bazel-bin/ios-app/ios-app.xcodeproj` - -Open this file in xcode and run the application on your target device -(or device simulator). - -Continuous integration ----------------------- -The script in ci/build.sh is used by [http://ci.bazel.io] to test that this workspace -still build against Bazel at head. diff --git a/tutorial/WORKSPACE b/tutorial/WORKSPACE deleted file mode 100644 index e59622436..000000000 --- a/tutorial/WORKSPACE +++ /dev/null @@ -1,86 +0,0 @@ -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -# rules required for ios-app - -http_archive( - name = "build_bazel_rules_apple", - sha256 = "62b24b9c3c1eb5bdb6fe1a3f4bf541d6e61eac8997e87c25a50c821f85bf8ff2", - url = "https://github.com/bazelbuild/rules_apple/releases/download/3.0.0-rc1/rules_apple.3.0.0-rc1.tar.gz", -) - -load( - "@build_bazel_rules_apple//apple:repositories.bzl", - "apple_rules_dependencies", -) - -apple_rules_dependencies() - -load( - "@build_bazel_rules_swift//swift:repositories.bzl", - "swift_rules_dependencies", -) - -swift_rules_dependencies() - -load( - "@build_bazel_rules_swift//swift:extras.bzl", - "swift_rules_extra_dependencies", -) - -swift_rules_extra_dependencies() - -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) - -apple_support_dependencies() - -# rules required by ios-app Xcode integration - -http_archive( - name = "rules_xcodeproj", - sha256 = "bc8b1ae066b7333a151fd3a9ebee0d51d7779886bfb8cf9fc6e0f9d6c110fc83", - url = "https://github.com/MobileNativeFoundation/rules_xcodeproj/releases/download/1.10.1/release.tar.gz", -) - -load( - "@rules_xcodeproj//xcodeproj:repositories.bzl", - "xcodeproj_rules_dependencies", -) - -xcodeproj_rules_dependencies() - -load("@bazel_features//:deps.bzl", "bazel_features_deps") - -bazel_features_deps() - -# rules required by backend - -http_archive( - name = "io_bazel_rules_appengine", - strip_prefix = "rules_appengine-03121ae8efa634f7219f53970650a4445a72b759", - # TODO: update to a release version that contains 339f6aba67fcedb7268cf54d1163cf7704a277ca. - # This commit fixes the Maven artifact URLs to use "https" instead of "http". - # We don't specify sha256, because the sha256 of GitHub-served non-release archives isn't - # stable. - urls = ["https://github.com/bazelbuild/rules_appengine/archive/03121ae8efa634f7219f53970650a4445a72b759.tar.gz"], -) - -load( - "@io_bazel_rules_appengine//appengine:java_appengine.bzl", - "java_appengine_repositories", -) - -java_appengine_repositories() - -# rules required by android - -android_sdk_repository(name = "androidsdk") - -http_archive( - name = "rules_android", - sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", - strip_prefix = "rules_android-0.1.1", - urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"], -) diff --git a/tutorial/android/BUILD b/tutorial/android/BUILD deleted file mode 100644 index a13eb3e0a..000000000 --- a/tutorial/android/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -load("@rules_android//android:rules.bzl", "android_binary", "android_library") - -# The final binary rule, which builds the APK and sets the application manifest, -# as well as any other resources needed by the application. -# The package for the R class for resources is normally inferred from the -# directory containing the BUILD file, but this BUILD file is not under a java -# directory, so we specify it manually. -android_binary( - name = "android", - custom_package = "com.google.bazel.example.android", - manifest = "src/main/java/com/google/bazel/example/android/AndroidManifest.xml", - resource_files = glob(["src/main/java/com/google/bazel/example/android/res/**"]), - visibility = ["//visibility:public"], - deps = [":activities"], -) - -# A library which compiles some Java sources and associated resources. -# Because it has resources, it requires a manifest. -android_library( - name = "activities", - srcs = glob(["src/main/java/com/google/bazel/example/android/activities/*.java"]), - custom_package = "com.google.bazel.example.android.activities", - manifest = "src/main/java/com/google/bazel/example/android/activities/AndroidManifest.xml", - resource_files = glob(["src/main/java/com/google/bazel/example/android/activities/res/**"]), -) diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/AndroidManifest.xml b/tutorial/android/src/main/java/com/google/bazel/example/android/AndroidManifest.xml deleted file mode 100644 index 6aa0c0a89..000000000 --- a/tutorial/android/src/main/java/com/google/bazel/example/android/AndroidManifest.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/AndroidManifest.xml b/tutorial/android/src/main/java/com/google/bazel/example/android/activities/AndroidManifest.xml deleted file mode 100644 index fae9791b3..000000000 --- a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/AndroidManifest.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/MainActivity.java b/tutorial/android/src/main/java/com/google/bazel/example/android/activities/MainActivity.java deleted file mode 100644 index 717a5f1c3..000000000 --- a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/MainActivity.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2015 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.bazel.example.android.activities; - -import android.app.Activity; -import android.os.AsyncTask; -import android.os.Bundle; -import android.util.Log; -import android.view.Menu; -import android.view.MenuItem; -import android.widget.TextView; -import android.widget.Toast; - -import org.json.JSONException; -import org.json.JSONObject; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.net.URLConnection; - -public class MainActivity extends Activity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - } - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - // Inflate the menu; this adds items to the action bar if it is present. - getMenuInflater().inflate(R.menu.menu_main, menu); - return true; - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - // Handle action bar item clicks here. The action bar will - // automatically handle clicks on the Home/Up button, so long - // as you specify a parent activity in AndroidManifest.xml. - int id = item.getItemId(); - - if (id == R.id.action_ping) { - new AsyncTask() { - public static final int READ_TIMEOUT_MS = 5000; - public static final int CONNECTION_TIMEOUT_MS = 2000; - - private String inputStreamToString(InputStream stream) throws IOException { - StringBuilder result = new StringBuilder(); - try { - BufferedReader reader = new BufferedReader(new InputStreamReader(stream, "UTF-8")); - String line; - while ((line = reader.readLine()) != null) { - result.append(line); - } - } finally { - stream.close(); - } - return result.toString(); - } - - private HttpURLConnection getConnection(String url) throws IOException { - URLConnection urlConnection = new URL(url).openConnection(); - urlConnection.setConnectTimeout(CONNECTION_TIMEOUT_MS); - urlConnection.setReadTimeout(READ_TIMEOUT_MS); - return (HttpURLConnection) urlConnection; - } - - @Override - protected String doInBackground(String... params) { - String url = params[0]; - HttpURLConnection connection = null; - try { - connection = getConnection(url); - return new JSONObject(inputStreamToString(connection.getInputStream())) - .getString("requested"); - } catch (IOException e) { - Log.e("background", "IOException", e); - return null; - } catch (JSONException e) { - Log.e("background", "JSONException", e); - return null; - } finally { - if (connection != null) { - connection.disconnect(); - } - } - } - - @Override - protected void onPostExecute(String result) { - TextView textView = (TextView) findViewById(R.id.text_view); - if (result == null) { - Toast.makeText( - MainActivity.this, getString(R.string.error_sending_request), Toast.LENGTH_LONG) - .show(); - textView.setText("???"); - return; - } - textView.setText(result); - } - }.execute("http://10.0.2.2:8080/boop"); - return true; - } - - return super.onOptionsItemSelected(item); - } -} diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-hdpi/ic_menu_upload.png b/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-hdpi/ic_menu_upload.png deleted file mode 100755 index a81ad2006..000000000 Binary files a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-hdpi/ic_menu_upload.png and /dev/null differ diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-ldpi/ic_menu_upload.png b/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-ldpi/ic_menu_upload.png deleted file mode 100755 index fd64fe1a5..000000000 Binary files a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-ldpi/ic_menu_upload.png and /dev/null differ diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-mdpi/ic_menu_upload.png b/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-mdpi/ic_menu_upload.png deleted file mode 100755 index 9e8459a5a..000000000 Binary files a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-mdpi/ic_menu_upload.png and /dev/null differ diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-xhdpi/ic_menu_upload.png b/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-xhdpi/ic_menu_upload.png deleted file mode 100755 index 94d1478bf..000000000 Binary files a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-xhdpi/ic_menu_upload.png and /dev/null differ diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-xxhdpi/ic_menu_upload.png b/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-xxhdpi/ic_menu_upload.png deleted file mode 100755 index 931e6ed27..000000000 Binary files a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/drawable-xxhdpi/ic_menu_upload.png and /dev/null differ diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/layout/activity_main.xml b/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/layout/activity_main.xml deleted file mode 100644 index 2451ba913..000000000 --- a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/layout/activity_main.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/menu/menu_main.xml b/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/menu/menu_main.xml deleted file mode 100644 index e2cb35523..000000000 --- a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/menu/menu_main.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/values-w820dp/dimens.xml b/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/values-w820dp/dimens.xml deleted file mode 100644 index 63fc81644..000000000 --- a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/values-w820dp/dimens.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 64dp - diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/values/dimens.xml b/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/values/dimens.xml deleted file mode 100644 index 47c822467..000000000 --- a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/values/dimens.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 16dp - 16dp - diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/values/strings.xml b/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/values/strings.xml deleted file mode 100644 index f35ff282e..000000000 --- a/tutorial/android/src/main/java/com/google/bazel/example/android/activities/res/values/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - HelloBazel - - Hello world! - Ping! - Something went wrong while talking to the server. :( - - diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/res/drawable-hdpi/ic_launcher.png b/tutorial/android/src/main/java/com/google/bazel/example/android/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index b8927f305..000000000 Binary files a/tutorial/android/src/main/java/com/google/bazel/example/android/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/res/drawable-ldpi/ic_launcher.png b/tutorial/android/src/main/java/com/google/bazel/example/android/res/drawable-ldpi/ic_launcher.png deleted file mode 100644 index 9de6daa02..000000000 Binary files a/tutorial/android/src/main/java/com/google/bazel/example/android/res/drawable-ldpi/ic_launcher.png and /dev/null differ diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/res/drawable-mdpi/ic_launcher.png b/tutorial/android/src/main/java/com/google/bazel/example/android/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index 487386f35..000000000 Binary files a/tutorial/android/src/main/java/com/google/bazel/example/android/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/res/drawable-xhdpi/ic_launcher.png b/tutorial/android/src/main/java/com/google/bazel/example/android/res/drawable-xhdpi/ic_launcher.png deleted file mode 100644 index d78064365..000000000 Binary files a/tutorial/android/src/main/java/com/google/bazel/example/android/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/tutorial/android/src/main/java/com/google/bazel/example/android/res/values/strings.xml b/tutorial/android/src/main/java/com/google/bazel/example/android/res/values/strings.xml deleted file mode 100644 index 2ffb66c03..000000000 --- a/tutorial/android/src/main/java/com/google/bazel/example/android/res/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - HelloBazel - - diff --git a/tutorial/backend/BUILD b/tutorial/backend/BUILD deleted file mode 100644 index 9781a0bca..000000000 --- a/tutorial/backend/BUILD +++ /dev/null @@ -1,29 +0,0 @@ -load("@io_bazel_rules_appengine//appengine:appengine.bzl", "appengine_war") -load("@rules_java//java:defs.bzl", "java_binary") - -package(default_visibility = ["//visibility:public"]) - -appengine_war( - name = "backend", - data = [":webapp"], - data_path = "/backend/webapp", - jars = [":app_deploy.jar"], -) - -filegroup( - name = "webapp", - srcs = glob(["webapp/**/*"]), -) - -# We only need a java_library, but create a java_binary because we need a bundle -# of all of the dependencies (a deploy jar) to pass to the appengine_war. So we -# specify a non-existant class as the main_class (as the "binary" will never be -# run directly, only used as a library). -java_binary( - name = "app", - srcs = glob(["src/main/java/**/*.java"]), - main_class = "does.not.exist", - deps = [ - "@io_bazel_rules_appengine//appengine:javax.servlet.api", - ], -) diff --git a/tutorial/backend/src/main/java/com/google/bazel/example/app/MyAppServlet.java b/tutorial/backend/src/main/java/com/google/bazel/example/app/MyAppServlet.java deleted file mode 100644 index c92304766..000000000 --- a/tutorial/backend/src/main/java/com/google/bazel/example/app/MyAppServlet.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 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.bazel.example.app; - -import java.io.IOException; - -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class MyAppServlet extends HttpServlet { - - @Override - public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { - response.setContentType("text/json"); - response.getWriter().println("{'requested' : '" + request.getRequestURI() + "'}"); - } - -} diff --git a/tutorial/backend/webapp/WEB-INF/appengine-web.xml b/tutorial/backend/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index 2081b9219..000000000 --- a/tutorial/backend/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - some-app - 1 - true - diff --git a/tutorial/backend/webapp/WEB-INF/web.xml b/tutorial/backend/webapp/WEB-INF/web.xml deleted file mode 100644 index 3827caffd..000000000 --- a/tutorial/backend/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - my-app - com.google.bazel.example.app.MyAppServlet - - - - my-app - /* - - - diff --git a/tutorial/ci/build.sh b/tutorial/ci/build.sh deleted file mode 100755 index e7b76043f..000000000 --- a/tutorial/ci/build.sh +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 2015 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. - -# Scripts to compile the tutorial on the CI system -# This script expect the following environment variable: -# $BAZEL_INSTALLER set to the path to the bazel installer -# $ANDROID_SDK_PATH is the path to the Android SDK. If the path isn't -# defined, then the android build won't be tested. - -IOS_SDK_VERSION=$(xcrun --sdk iphonesimulator --show-sdk-version) - -# Go to the workspace root -cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" - -echo "Workspace directory: ${PWD}" - -if [ -z "${BAZEL_INSTALLER}" ]; then - echo "BAZEL_INSTALLER environment variable not provided," >&2 - echo "Please set it to the path of the Bazel's installer." >&2 - exit 1 -fi - -set -eux -# Set-up android tooling if provided -if [ -n "${ANDROID_SDK_PATH-}" ]; then - cat >>WORKSPACE <>WORKSPACE - cat >>WORKSPACE <>WORKSPACE < - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/tutorial/ios-app/UrlGet/AppDelegate.m b/tutorial/ios-app/UrlGet/AppDelegate.m deleted file mode 100644 index 50cbaebf2..000000000 --- a/tutorial/ios-app/UrlGet/AppDelegate.m +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2015 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. - -#import "AppDelegate.h" - -#import "UrlGetViewController.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - - UITabBarController *bar = [[UITabBarController alloc] init]; - [bar setViewControllers: - @[[[UrlGetViewController alloc] init]]]; - bar.selectedIndex = 0; - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - self.window.rootViewController = bar; - [self.window makeKeyAndVisible]; - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application {} - -- (void)applicationDidEnterBackground:(UIApplication *)application {} - -- (void)applicationWillEnterForeground:(UIApplication *)application {} - -- (void)applicationDidBecomeActive:(UIApplication *)application {} - -- (void)applicationWillTerminate:(UIApplication *)application {} - -@end diff --git a/tutorial/ios-app/UrlGet/UrlGet-Info.plist b/tutorial/ios-app/UrlGet/UrlGet-Info.plist deleted file mode 100644 index b357f3b12..000000000 --- a/tutorial/ios-app/UrlGet/UrlGet-Info.plist +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ios-app - CFBundleExecutable - ios-app - CFBundleIdentifier - Google.UrlGet - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ios-app - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/tutorial/ios-app/UrlGet/UrlGetViewController.h b/tutorial/ios-app/UrlGet/UrlGetViewController.h deleted file mode 100644 index 6d729845a..000000000 --- a/tutorial/ios-app/UrlGet/UrlGetViewController.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2015 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. - -#import - -@interface UrlGetViewController : UIViewController - -- (IBAction)getUrl:(id)sender; - -@property (weak, nonatomic) IBOutlet UITextView *urlContentTextView; -@property (weak, nonatomic) IBOutlet UITextField *urlTextField; - -@end diff --git a/tutorial/ios-app/UrlGet/UrlGetViewController.m b/tutorial/ios-app/UrlGet/UrlGetViewController.m deleted file mode 100644 index 87b40fa87..000000000 --- a/tutorial/ios-app/UrlGet/UrlGetViewController.m +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2015 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. - -#import "UrlGetViewController.h" - -@interface UrlGetViewController () -@end - -@implementation UrlGetViewController { -} - -- (IBAction)getUrl:(id)sender { - NSURL *url = [NSURL URLWithString:self.urlTextField.text]; - NSData *data = [NSData dataWithContentsOfURL:url]; - self.urlContentTextView.text = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; -} - -@end diff --git a/tutorial/ios-app/UrlGet/UrlGetViewController.xib b/tutorial/ios-app/UrlGet/UrlGetViewController.xib deleted file mode 100644 index 64b80b753..000000000 --- a/tutorial/ios-app/UrlGet/UrlGetViewController.xib +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. - - - - - - - - - - - - - - diff --git a/tutorial/ios-app/UrlGet/main.m b/tutorial/ios-app/UrlGet/main.m deleted file mode 100644 index 9c7f114bd..000000000 --- a/tutorial/ios-app/UrlGet/main.m +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2015 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. - -#import - -int main(int argc, char * argv[]) { - @autoreleasepool { - NSString *delegateClassName = @"AppDelegate"; - return UIApplicationMain(argc, argv, nil, delegateClassName); - } -} diff --git a/tutorial/platform_mappings b/tutorial/platform_mappings deleted file mode 100644 index d31b6f119..000000000 --- a/tutorial/platform_mappings +++ /dev/null @@ -1,120 +0,0 @@ -platforms: - @build_bazel_apple_support//platforms:macos_x86_64 - --cpu=darwin_x86_64 - - @build_bazel_apple_support//platforms:macos_arm64 - --cpu=darwin_arm64 - - @build_bazel_apple_support//platforms:darwin_arm64e - --cpu=darwin_arm64e - - @build_bazel_apple_support//platforms:ios_i386 - --cpu=ios_i386 - - @build_bazel_apple_support//platforms:ios_x86_64 - --cpu=ios_x86_64 - - @build_bazel_apple_support//platforms:ios_sim_arm64 - --cpu=ios_sim_arm64 - - @build_bazel_apple_support//platforms:ios_armv7 - --cpu=ios_armv7 - - @build_bazel_apple_support//platforms:ios_arm64 - --cpu=ios_arm64 - - @build_bazel_apple_support//platforms:ios_arm64e - --cpu=ios_arm64e - - @build_bazel_apple_support//platforms:tvos_x86_64 - --cpu=tvos_x86_64 - - @build_bazel_apple_support//platforms:tvos_sim_arm64 - --cpu=tvos_sim_arm64 - - @build_bazel_apple_support//platforms:tvos_arm64 - --cpu=tvos_arm64 - - @build_bazel_apple_support//platforms:watchos_i386 - --cpu=watchos_i386 - - @build_bazel_apple_support//platforms:watchos_x86_64 - --cpu=watchos_x86_64 - - @build_bazel_apple_support//platforms:watchos_arm64 - --cpu=watchos_arm64 - - @build_bazel_apple_support//platforms:watchos_armv7k - --cpu=watchos_armv7k - - @build_bazel_apple_support//platforms:watchos_arm64_32 - --cpu=watchos_arm64_32 - -flags: - --cpu=darwin_x86_64 - --apple_platform_type=macos - @build_bazel_apple_support//platforms:macos_x86_64 - - --cpu=darwin_arm64 - --apple_platform_type=macos - @build_bazel_apple_support//platforms:macos_arm64 - - --cpu=darwin_arm64e - --apple_platform_type=macos - @build_bazel_apple_support//platforms:darwin_arm64e - - --cpu=ios_i386 - --apple_platform_type=ios - @build_bazel_apple_support//platforms:ios_i386 - - --cpu=ios_x86_64 - --apple_platform_type=ios - @build_bazel_apple_support//platforms:ios_x86_64 - - --cpu=ios_sim_arm64 - --apple_platform_type=ios - @build_bazel_apple_support//platforms:ios_sim_arm64 - - --cpu=ios_armv7 - --apple_platform_type=ios - @build_bazel_apple_support//platforms:ios_armv7 - - --cpu=ios_arm64 - --apple_platform_type=ios - @build_bazel_apple_support//platforms:ios_arm64 - - --cpu=ios_arm64e - --apple_platform_type=ios - @build_bazel_apple_support//platforms:ios_arm64e - - --cpu=tvos_x86_64 - --apple_platform_type=tvos - @build_bazel_apple_support//platforms:tvos_x86_64 - - --cpu=tvos_sim_arm64 - --apple_platform_type=tvos - @build_bazel_apple_support//platforms:tvos_sim_arm64 - - --cpu=tvos_arm64 - --apple_platform_type=tvos - @build_bazel_apple_support//platforms:tvos_arm64 - - --cpu=watchos_i386 - --apple_platform_type=watchos - @build_bazel_apple_support//platforms:watchos_i386 - - --cpu=watchos_x86_64 - --apple_platform_type=watchos - @build_bazel_apple_support//platforms:watchos_x86_64 - - --cpu=watchos_arm64 - --apple_platform_type=watchos - @build_bazel_apple_support//platforms:watchos_arm64 - - --cpu=watchos_armv7k - --apple_platform_type=watchos - @build_bazel_apple_support//platforms:watchos_armv7k - - --cpu=watchos_arm64_32 - --apple_platform_type=watchos - @build_bazel_apple_support//platforms:watchos_arm64_32