{"id":21076413,"url":"https://github.com/rapter1990/build-it-bigger","last_synced_at":"2025-03-14T03:44:13.588Z","repository":{"id":124090368,"uuid":"131174401","full_name":"Rapter1990/Build-It-Bigger","owner":"Rapter1990","description":null,"archived":false,"fork":false,"pushed_at":"2018-05-01T22:05:31.000Z","size":49737,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T22:53:07.764Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rapter1990.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-26T15:17:25.000Z","updated_at":"2018-05-01T22:05:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"047cefc7-4fd2-46f6-8e7f-8ee70291f4ae","html_url":"https://github.com/Rapter1990/Build-It-Bigger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2FBuild-It-Bigger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2FBuild-It-Bigger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2FBuild-It-Bigger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2FBuild-It-Bigger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rapter1990","download_url":"https://codeload.github.com/Rapter1990/Build-It-Bigger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243521252,"owners_count":20304186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T19:28:16.904Z","updated_at":"2025-03-14T03:44:13.573Z","avatar_url":"https://github.com/Rapter1990.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gradle for Android and Java Final Project\n\nIn this project, you will create an app with multiple flavors that uses\nmultiple libraries and Google Cloud Endpoints. The finished app will consist\nof four modules. A Java library that provides jokes, a Google Cloud Endpoints\n(GCE) project that serves those jokes, an Android Library containing an\nactivity for displaying jokes, and an Android app that fetches jokes from the\nGCE module and passes them to the Android Library for display.\n\n## Why this Project\n\nAs Android projects grow in complexity, it becomes necessary to customize the\nbehavior of the Gradle build tool, allowing automation of repetitive tasks.\nParticularly, factoring functionality into libraries and creating product\nflavors allow for much bigger projects with minimal added complexity.\n\n## What Will I Learn?\n\nYou will learn the role of Gradle in building Android Apps and how to use\nGradle to manage apps of increasing complexity. You'll learn to:\n\n* Add free and paid flavors to an app, and set up your build to share code between them\n* Factor reusable functionality into a Java library\n* Factor reusable Android functionality into an Android library\n* Configure a multi project build to compile your libraries and app\n* Use the Gradle App Engine plugin to deploy a backend\n* Configure an integration test suite that runs against the local App Engine development server\n\n## How Do I Complete this Project?\n\n### Step 0: Starting Point\n\nThis is the starting point for the final project, which is provided to you in\nthe [course repository](https://github.com/udacity/ud867/tree/master/FinalProject). It\ncontains an activity with a banner ad and a button that purports to tell a\njoke, but actually just complains. The banner ad was set up following the\ninstructions here:\n\nhttps://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start\n\nYou may need to download the Google Repository from the Extras section of the\nAndroid SDK Manager.\n\nYou will also notice a folder called backend in the starter code. \nIt will be used in step 3 below, and you do not need to worry about it for now.\n\nWhen you can build an deploy this starter code to an emulator, you're ready to\nmove on.\n\n### Step 1: Create a Java library\n\nYour first task is to create a Java library that provides jokes. Create a new\nGradle Java project either using the Android Studio wizard, or by hand. Then\nintroduce a project dependency between your app and the new Java Library. If\nyou need review, check out demo 4.01 from the course code.\n\nMake the button display a toast showing a joke retrieved from your Java joke\ntelling library.\n\n### Step 2: Create an Android Library\n\nCreate an Android Library containing an Activity that will display a joke\npassed to it as an intent extra. Wire up project dependencies so that the\nbutton can now pass the joke from the Java Library to the Android Library.\n\nFor review on how to create an Android library, check out demo 4.03. For a\nrefresher on intent extras, check out;\n\nhttp://developer.android.com/guide/components/intents-filters.html\n\n### Step 3: Setup GCE\n\nThis next task will be pretty tricky. Instead of pulling jokes directly from\nour Java library, we'll set up a Google Cloud Endpoints development server,\nand pull our jokes from there. The starter code already includes the GCE module \nin the folder called backend.\n\nBefore going ahead you will need to be able to run a local instance of the GCE \nserver. In order to do that you will have to install the Cloud SDK:\n\nhttps://cloud.google.com/sdk/docs/\n\nOnce installed, you will need to follow the instructions in the Setup Cloud SDK\nsection at:\n\nhttps://cloud.google.com/endpoints/docs/frameworks/java/migrating-android\n\nNote: You do not need to follow the rest of steps in the migration guide, only\nthe Setup Cloud SDK.\n\nStart or stop your local server by using the gradle tasks as shown in the following\nscreenshot:\n\n\u003cimg src=\"/FinalProject/GCE-server-gradle-tasks.png\" height=\"500\"\u003e\n\nOnce your local GCE server is started you should see the following at \n[localhost:8080](http://localhost:8080)\n\n\u003cimg src=\"https://raw.githubusercontent.com/GoogleCloudPlatform/gradle-appengine-templates/77e9910911d5412e5efede5fa681ec105a0f02ad/doc/img/devappserver-endpoints.png\"\u003e\n\nNow you are ready to continue! \n\nIntroduce a project dependency between your Java library \nand your GCE module, and modify the GCE starter code to pull jokes from your Java library. \nCreate an AsyncTask to retrieve jokes using the template included int these \n[instructions](https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/77e9910911d5412e5efede5fa681ec105a0f02ad/HelloEndpoints#2-connecting-your-android-app-to-the-backend). \nMake the button kick off a task to retrieve a joke, \nthen launch the activity from your Android Library to display it.\n\n\n### Step 4: Add Functional Tests\n\nAdd code to test that your Async task successfully retrieves a non-empty\nstring. For a refresher on setting up Android tests, check out demo 4.09.\n\n### Step 5: Add a Paid Flavor\n\nAdd free and paid product flavors to your app. Remove the ad (and any\ndependencies you can) from the paid flavor.\n\n## Optional Tasks\n\nFor extra practice to make your project stand out, complete the following tasks.\n\n### Add Interstitial Ad\n\nFollow these instructions to add an interstitial ad to the free version.\nDisplay the ad after the user hits the button, but before the joke is shown.\n\nhttps://developers.google.com/mobile-ads-sdk/docs/admob/android/interstitial\n\n### Add Loading Indicator\n\nAdd a loading indicator that is shown while the joke is being retrieved and\ndisappears when the joke is ready. The following tutorial is a good place to\nstart:\n\nhttp://www.tutorialspoint.com/android/android_loading_spinner.htm\n\n### Configure Test Task\n\nTo tie it all together, create a Gradle task that:\n\n1. Launches the GCE local development server\n2. Runs all tests\n3. Shuts the server down again\n\n# Rubric\n\n### Required Components\n\n* Project contains a Java library for supplying jokes\n* Project contains an Android library with an activity that displays jokes passed to it as intent extras.\n* Project contains a Google Cloud Endpoints module that supplies jokes from the Java library. Project loads jokes from GCE module via an async task.\n* Project contains connected tests to verify that the async task is indeed loading jokes.\n* Project contains paid/free flavors. The paid flavor has no ads, and no unnecessary dependencies.\n\n### Required Behavior\n\n* App retrieves jokes from Google Cloud Endpoints module and displays them via an Activity from the Android Library.\n\n### Optional Components\n\nOnce you have a functioning project, consider adding more features to test your Gradle and Android skills. Here are a few suggestions:\n\n* Make the free app variant display interstitial ads between the main activity and the joke-displaying activity.\n* Have the app display a loading indicator while the joke is being fetched from the server.\n* Write a Gradle task that starts the GCE dev server, runs all the Android tests, and shuts down the dev server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapter1990%2Fbuild-it-bigger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapter1990%2Fbuild-it-bigger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapter1990%2Fbuild-it-bigger/lists"}