Git Product home page Git Product logo

builditbigger's Introduction

Gradle for Android and Java Final Project

Building it bigger with Gradle.

Taking the starter code from Udacity and implemented a Java library for supplying jokes, an Android library with an Activity that displays jokes and a Google Cloud Endpoints module that supplies jokes from the Java library. Project loads jokes from GCE module via an async task. Project contains connected tests to verify that the async task is indeed loading jokes. The project contains two flavors, a free flavor with ads and a paid flavor without ads.


In this project, I created an app with multiple flavors that uses multiple libraries and Google Cloud Endpoints. The app consists of four modules. A Java library that provides jokes, a Google Cloud Endpoints (GCE) project that serves those jokes, an Android Library containing an activity for displaying jokes, and an Android app that fetches jokes from the GCE module and passes them to the Android Library for display.

  • As Android projects grow in complexity, it becomes necessary to customize the behavior of the Gradle build tool, allowing automation of repetitive tasks. Particularly, factoring functionality into libraries and creating product flavors allow for much bigger projects with minimal added complexity.

Features

  • Free and paid flavors to an app, and set up your build to share code between them
  • Factor reusable functionality into a Java library
  • Factor reusable Android functionality into an Android library
  • Multi project build to compile your libraries and app
  • Uses the Gradle App Engine plugin to deploy a backend
  • Configure an integration test suite that runs against the local App Engine development server

Steps

  • Created a Java library
  • Created an Android Library
  • Step 3: Setup GCE
  • Added Functional Tests
  • Added a Paid Flavor
  • Added Interstitial Ad

Configure Test Task

To tie it all together, create a Gradle task that:

  1. Launches the GCE local development server
  2. Runs all tests
  3. Shuts the server down again
  • Made the free app variant display interstitial ads between the main activity and the joke-displaying activity.
  • Have the app display a loading indicator while the joke is being fetched from the server.
  • Write a Gradle task that starts the GCE dev server, runs all the Android tests, and shuts down the dev server.

builditbigger's People

Contributors

kiduel avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.