{"id":22412998,"url":"https://github.com/marcosvbras/gradle-course","last_synced_at":"2026-05-04T03:35:31.526Z","repository":{"id":93743357,"uuid":"159095683","full_name":"marcosvbras/gradle-course","owner":"marcosvbras","description":"This repository groups everything that I learned on course Gradle for Android and Java from Udacity","archived":false,"fork":false,"pushed_at":"2018-12-10T02:48:59.000Z","size":4798,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T08:47:43.934Z","etag":null,"topics":["android","build-automation","build-tool","course","gradle","gradle-task"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcosvbras.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-26T02:00:41.000Z","updated_at":"2018-12-10T02:49:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"bce8b036-44f3-4305-ad52-15dc2fea9fe0","html_url":"https://github.com/marcosvbras/gradle-course","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/marcosvbras%2Fgradle-course","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosvbras%2Fgradle-course/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosvbras%2Fgradle-course/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosvbras%2Fgradle-course/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcosvbras","download_url":"https://codeload.github.com/marcosvbras/gradle-course/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245774554,"owners_count":20669974,"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":["android","build-automation","build-tool","course","gradle","gradle-task"],"created_at":"2024-12-05T14:11:36.275Z","updated_at":"2026-05-04T03:35:26.508Z","avatar_url":"https://github.com/marcosvbras.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gradle Course\n\nThis repository has everything I learned on Udacity course *Gradle for Android and Java*. There are all exercises that I did during the course and a small summary with some theoretical information about Gradle.\n\n## Why does Android use Gradle?\n\nThe Java source created on Android Studio is not compiled as standard Java byte code, it is compiled to a custom byte code for the Android run time instead. There are three types of Android resources that are packed differently and all these things are not too simple to do by hand.\n\n## How to install Gradle?\n\nGradle knows how to install itself through a shell script and a tiny jar that knows how to download and install it. So, to do this job, everything you need is a gradle script and a Gradle Wrapper jar in the same directory level.\n\nIf you use Mac or Linux, just type:\n```bash\n$ ./gradlew\n```\n\nOr, if you use Windows, just type:\n```bash\ngradlew\n```\n\nThe approach above will work just with an existing Gradle project. That way we can ensure that everyone working on the project is using the same version of Gradle. However, if you want to create a new Gradle project, you will need a local installation of Gradle.\n\n### Mac/Linux Install\n\n- Download the [latest version of Gradle](https://gradle.org/gradle-download/)\n- Run the following code\n\n```bash\n$ unzip ~/Downloads/gradle-2.11-all.zip -d /usr/local/gradle/ \u0026\u0026 export GRADLE_HOME=/usr/local/gradle/gradle-2.11\n$ PATH=$GRADLE_HOME/bin:$PATH\n$ export PATH\n# Turning on the Gradle daemon by default\n$ export GRADLE_OPTS=\"-Dorg.gradle.daemon=true\" \u003e\u003e ~/.bash_profile \u0026\u0026 source ~/.bash_profile\n```\n\n\u003e **NOTE**: Don't forget changing the commands Gradle version to which one you downloaded.\n\n### Windows Install\n\nFirst, head over to https://gradle.org/gradle-download/, and download the latest version of Gradle. Note that we want the complete distribution. Next, we'll unzip Gradle and move it to where we want it to live. Our recommendation is in `C:\\gradle-2.11`.\n\nTo tell Windows where to find Gradle, we need to add an environment variable. Navigate to the Control Panel \u003e System \u003e Advanced system settings \u003e Advanced \u003e Environment Variables... \u003e System variables \u003e New...\n\nSet the variable name to: GRADLE_HOME Set the variable value to the location you unzipped Gradle if you followed our suggestion it should be: C:\\gradle-2.11\n\nThen edit the PATH user variable by appending: ;%GRADLE_HOME%\\bin\\\n\nYour path will then look something like:\n\n    \u003ca bunch of directories\u003e;%GRADLE_HOME%\\bin\\\n\nWhen you're done, run `gradle --version` to ensure the installation is complete.\n\nFinally, let's add a properties file to tell Gradle to use the daemon by default. All we need to do is put a file named `gradle.properties` in\n\nC:\\Users\\\u003cyour username\u003e\\.gradle, and add the line `org.gradle.daemon=true`.\n\n\u003e **NOTE**: Don't forget changing the commands Gradle version to which one you downloaded.\n\n## How does Gradle work?\n\nGradle has to do a significant amount of work to start up, mainly because it is required to use an instance of the JVM to run. This startup time can be mitigated by using the Gradle Demon. When Gradle's instructed to use a demon, a demon process has started, and continuously runs in the background, keeping the JVM instance alive. So that subsequent Gradle runs can use the same instance. By default, Android Studio always uses this as Gradle demon, when running Gradle from the command line however you'll have to explicitly enable it. Simply put you should always use a demon when it is possible.\n\nThe build scripts are written in Groovy. Groovy interoperates extremely well with Java and has some special features that make it ideally suited for creating domain specific languages (DSLs). Gradle provides its own Groovy distribution, so we don't even need to install Groovy to get started.\n\nGradle works with a concept called Tasks. A task is a self-contained unit of work that Gradle can reason about. A task has an action that do something, e.g. copy some files from one directory to another.\n\n## Command Summary\n\n- `gradle \u003ctask\u003e`: Run a task\n- `gradle tasks`: See a list of available tasks\n- `gradle --status`: See all Daemons status\n- `gradle --stop`: Stop running all Daemons\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosvbras%2Fgradle-course","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcosvbras%2Fgradle-course","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosvbras%2Fgradle-course/lists"}