All Projects → gdubw → Gdub

gdubw / Gdub

Licence: mit
A gradlew / gradle wrapper.

Programming Languages

shell
77523 projects

Labels

Projects that are alternatives of or similar to Gdub

Kotlin Examples
Various examples for Kotlin
Stars: ✭ 3,014 (+866.03%)
Mutual labels:  gradle
Javapackager
📦 Gradle/Maven plugin to package Java applications as native Windows, Mac OS X, or GNU/Linux executables and create installers for them.
Stars: ✭ 285 (-8.65%)
Mutual labels:  gradle
Minecolonies
Minecolonies minecraft mod
Stars: ✭ 303 (-2.88%)
Mutual labels:  gradle
Gradle Code Quality Tools Plugin
Gradle plugin that generates ErrorProne, Findbugs, Checkstyle, PMD, CPD, Lint, Detekt & Ktlint Tasks for every subproject.
Stars: ✭ 282 (-9.62%)
Mutual labels:  gradle
Gittoolbox
GitToolBox IntelliJ plugin
Stars: ✭ 284 (-8.97%)
Mutual labels:  gradle
Atom
Java course materials
Stars: ✭ 293 (-6.09%)
Mutual labels:  gradle
Gradle Aws Plugin
Gradle plugin to manage Amazon Web Services
Stars: ✭ 269 (-13.78%)
Mutual labels:  gradle
Boardview
A draggable boardview for java android (Kanban style)
Stars: ✭ 309 (-0.96%)
Mutual labels:  gradle
Gradle Ssh Plugin
Gradle SSH Plugin
Stars: ✭ 289 (-7.37%)
Mutual labels:  gradle
Play Services Plugins
Plugins to help with using Google Play services SDK.
Stars: ✭ 298 (-4.49%)
Mutual labels:  gradle
Gradle Multi Project Example
Gradle 多项目管理示例
Stars: ✭ 283 (-9.29%)
Mutual labels:  gradle
Plotsquared
PlotSquared - Reinventing the plotworld
Stars: ✭ 284 (-8.97%)
Mutual labels:  gradle
The Pit Of The Android Studio
👍 👍 👏 🌟 ⭐️ ⭐️ Everything about the Android Studio and Intellij IDEAfor example:Install,common problems and solutions,each libraries for android and androidx library,code and peoject templates,etc.全面总结Android Studio以及Intellij IDEA的填坑指南,详解AS版本号、Gradle版本、BuildTools三者的对照关系,AS模板配置,gradle插件,Android自带注解库详解,support详解等干货。
Stars: ✭ 296 (-5.13%)
Mutual labels:  gradle
Gradle Unused Resources Remover Plugin
Gradle Plugin that removes unused resources in Android projects.
Stars: ✭ 282 (-9.62%)
Mutual labels:  gradle
Mmorpg
springboot编写的轻量级高性能mmorpg手游服务端框架,基本功能逐渐完善中。
Stars: ✭ 309 (-0.96%)
Mutual labels:  gradle
Android Camera2 Secret Picture Taker
Take pictures 📷 secretly (without preview or launching device's camera app) using Android CAMERA2 API
Stars: ✭ 275 (-11.86%)
Mutual labels:  gradle
Xhttp2
💪A powerful network request library, encapsulated using the RxJava2 + Retrofit2 + OKHttp combination.(一个功能强悍的网络请求库,使用RxJava2 + Retrofit2 + OKHttp组合进行封装)
Stars: ✭ 292 (-6.41%)
Mutual labels:  gradle
App Engine
分布式App服务端快速开发框架
Stars: ✭ 313 (+0.32%)
Mutual labels:  gradle
Fataar Gradle Plugin
Gradle plugin to help embed dependencies in generated AAR artifact
Stars: ✭ 308 (-1.28%)
Mutual labels:  gradle
Emotion Rating View
A library for animated rating view in Android apps.
Stars: ✭ 299 (-4.17%)
Mutual labels:  gradle

This project is obsolete. Please use 'gng' instead. Visit at gng

What's gdub?

gdub (gw on the command line) is a gradle / gradlew wrapper. Not to be confused with the Gradle Wrapper, gw invokes ./gradlew on projects where one is configured, and falls back to use the gradle from the $PATH if a wrapper is not available. Also, gw is 66% shorter to type than gradle and 78% shorter to type than ./gradlew.

Installation

There are now a few ways to install gdub, with more on the way. Use whichever is most convenient for you or feel free to suggest another!

Homebrew

If you are on OSX and not using homebrew, I'm not quite sure what to do with you. Install gdub with homebrew like so:

brew install gdub

MacPorts

If you use MacPorts, you can install gdub like so:

sudo port install gdub

bpkg

If you use bpkg, you may install like so:

bpkg install dougborg/gdub -g

Installing gdub from source

You will probably want to install Gradle first. While this is not technically necessary if all your projects are using a Gradle Wrapper, it is a good idea to have the latest version of gradle available system-wide because some handy Gradle features are available outside the context of an existing project.

Check out a copy of the gdub repository. Then, either add the gdub bin directory to your $PATH, or run the provided install command with the location to the prefix in which you want to install gdub. The default prefix is /usr/local.

For example, to install gdub into /usr/local/bin:

git clone https://github.com/dougborg/gdub.git
cd gdub
./install

Note: you may need to run ./install with sudo if you do not have permission to write to the installation prefix.

Aliasing the gradle command

For maximum fidelity add a gradle alias to gw to your shell's configuration file.

Example bash:

echo "alias gradle=gw" >> ~/.bashrc
source ~/.bashrc

From now on you can just type gradle ... from wherever you are and gw takes care of the rest. Happiness ensues!

Why gdub?

The problems with gradle and gradlew

gdub is a convenience for developers running local Gradle commands and addresses a few minor shortcomings of gradle and gradlew's commandline behaviour. These are known issues, and they are set to be addressed in future versions of Gradle. If you are interested in the discussions surrounding them, check out:

Here are the issues I feel are most important, and the ones gdub attempts to address:

You have to provide a relative path to build.Gradle

If you are using the gradle command, and you are not in the same directory as the build.gradle file you want to run, you have to provide gradle the path. Depending on where you happen to be, this can be somewhat cumbersome:

$ pwd
~/myProject/src/main/java/org/project
$ gradle -b ../../../../../build.gradle build

With gw, this becomes:

$ gw build

You have to provide a relative path to gradlew

If you are using gradlew and you want to run your build, you need to do something similiar and provide the relative path to the gradlew script:

$ pwd
~/myProject/src/main/java/org/project/stuff
$ ../../../../../../gradlew build

Again, with gw this becomes:

$ gw build

You have a combination of the above problems

I don't even want to type out an example of this, let alone do it on a day-to-day basis. Use your imagination.

Typing ./gradlew to run the Gradle wrapper is kind of inconvenient

Even with tab completion and sitting at the root of your project, you have to type at least ./gr<tab>. It gets a bit worse if you happen to have a Gradle.properties file, and with the Gradle wrapper, you have a gradle directory to contend with as well. A simple alias would solve this problem, but you still have the other (more annoying) issues to contend with.

You meant to use the project's gradlew, but typed gradle instead

This can be a problem if the project you are building has customizations to the Gradle wrapper or for some reason is only compatible with a certain version of Gradle that is configured in the wrapper. If you know the project uses Gradle, you may be tempted to just use your own system's Gradle binary. This might be ok, or it might cause the build to break, but if a project has a gradlew, it is a pretty safe bet you should use it, and not whatever Gradle distribution you happen to have installed on your system.

The gw payoff

Anywhere you happen to be on your project, you can run the Gradle tasks of your project by typing gw <tasks>, regardless of whether you use the Gradle Wrapper in your project or not.

gw works by looking upwards from your current directory and will run the nearest build.Gradle file with the nearest gradlew. If a gradlew cannot be found, it will run the nearest build.Gradle with your system's Gradle. This is probably always what you want to do if you are running Gradle from within a project's tree that uses the Gradle build system.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].