parent
85925f0f8b
commit
3a561404f0
@ -0,0 +1,62 @@
|
|||||||
|
# built application files
|
||||||
|
*.apk
|
||||||
|
*.ap_
|
||||||
|
|
||||||
|
# files for the dex VM
|
||||||
|
*.dex
|
||||||
|
|
||||||
|
# Java class files
|
||||||
|
*.class
|
||||||
|
|
||||||
|
# generated files
|
||||||
|
bin/
|
||||||
|
gen/
|
||||||
|
|
||||||
|
# Local configuration file (sdk path, etc)
|
||||||
|
local.properties
|
||||||
|
|
||||||
|
# Eclipse project files
|
||||||
|
.classpath
|
||||||
|
.project
|
||||||
|
|
||||||
|
# Proguard folder generated by Eclipse
|
||||||
|
proguard/
|
||||||
|
proguard-project.txt
|
||||||
|
|
||||||
|
# Android Studio
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
.gradle/**
|
||||||
|
build/**
|
||||||
|
.idea/**
|
||||||
|
import-summary.txt
|
||||||
|
|
||||||
|
*.pydevproject
|
||||||
|
.project
|
||||||
|
.metadata
|
||||||
|
.gradle
|
||||||
|
build/**
|
||||||
|
bin/**
|
||||||
|
tmp/**
|
||||||
|
tmp/**/*
|
||||||
|
*.tmp
|
||||||
|
*.bak
|
||||||
|
*.swp
|
||||||
|
*~.nib
|
||||||
|
local.properties
|
||||||
|
.classpath
|
||||||
|
.settings/
|
||||||
|
.loadpath
|
||||||
|
|
||||||
|
# External tool builders
|
||||||
|
.externalToolBuilders/
|
||||||
|
|
||||||
|
# Locally stored "Eclipse launch configurations"
|
||||||
|
*.launch
|
||||||
|
|
||||||
|
# CDT-specific
|
||||||
|
.cproject
|
||||||
|
|
||||||
|
# PDT-specific
|
||||||
|
.buildpath
|
@ -1,155 +1,43 @@
|
|||||||
## :ledger: App Ideas Collection
|
# Book Search Demo
|
||||||
|
|
||||||

|
Android app that leverages the [OpenLibrary API](https://openlibrary.org/developers/api) to search books and display cover images. It also allows you to recommend books to friends. See the [Book Search Tutorial](http://guides.codepath.com/android/Book-Search-Tutorial) on our cliffnotes for a step-by-step tutorial.
|
||||||
|
|
||||||
[](./CONTRIBUTING.md)
|
The app is composed of two screens. The first screen displays a list of books, in which, each book is described by its title, author and cover photo. After a user selects a book from the list, a second screen appears displaying additional details about the book, including the publisher and no. of pages.
|
||||||
|
|
||||||
Have you ever wanted to build something but you had no idea what to do? Just as
|
**Book List**
|
||||||
authors sometimes have "writers block" it's also true for developers. This list is intended to solve this issue once and for all! 👍
|
|
||||||
|

|
||||||
These applications are:
|
|
||||||
|
**Book Details**
|
||||||
- great for improving your coding skills :muscle:;
|
|
||||||
- great for experimenting with new technologies 🆕;
|

|
||||||
- great for adding to your portfolio to impress your next employer/client :file_folder:;
|
|
||||||
- great for using as examples in tutorials (articles or videos) :page_with_curl:;
|
## Overview
|
||||||
- easy to complete and also easily extendable with new features :ok_hand:;
|
|
||||||
|
The app does the following:
|
||||||
This is not just a simple list of projects, but a collection that describes each project in enough detail so that you can develop it from the ground up!
|
|
||||||
|
1. Search a list of books using the [OpenLibrary Search API](https://openlibrary.org/dev/docs/api/search)
|
||||||
Each project has the following **features**:
|
2. Display the list of books with their cover images and details
|
||||||
|
3. Replace ActionBar with Toolbar
|
||||||
1. A clear and descriptive objective;
|
4. Use SearchView to search for books with a title
|
||||||
2. A list of _User Stories_ which should be implemented (these stories act more as a guideline than a forced list of _To-Do's_. Feel free to add your own stories if you want);
|
5. Show ProgressBar before each network request
|
||||||
3. A list of bonus features that not only improve the base project, but also your skills at the same time (these are optional and should be attempted only after you have completed the required user stories)
|
6. Add a detail view to display more information about the selected book from the list
|
||||||
4. All the resources and links to help you find what you need to complete the project
|
7. Use a share intent to recommend a book to friends
|
||||||
|
|
||||||
## Projects
|
To achieve this, there are five different components in this app:
|
||||||
|
|
||||||
Projects are divided into three tiers based on the knowledge and experience
|
1. `BookClient` - Responsible for executing the API requests and retrieving the JSON
|
||||||
required to complete them.
|
2. `Book` - Model object responsible for encapsulating the attributes for each individual book
|
||||||
|
3. `BookAdapter` - Responsible for mapping each `Book` to a particular view layout
|
||||||
| Tier | Developer Profile |
|
4. `BookListActivity` - Responsible for fetching and deserializing the data, configuring the adapter and providing a search interface
|
||||||
| :--: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
5. `BookDetailActivity` - Responsible for providing book detail view and share intent.
|
||||||
| 1 | Developers in the early stages of their learning journey. Those who are typically focused on creating user-facing applications. |
|
|
||||||
| 2 | Developers at an intermediate stage of learning and experience. They are comfortable in UI/UX, using development tools, and building apps that use API services. |
|
See the [Book Search Tutorial](http://guides.codepath.com/android/Book-Search-Tutorial) on our cliffnotes for a step-by-step tutorial.
|
||||||
| 3 | Developers who have all of the above, and are learning more advanced techniques like implementing backend applications and database services. |
|
|
||||||
|
## Libraries
|
||||||
🌟 - New Project
|
|
||||||
|
This app leverages two third-party libraries:
|
||||||
### Tier-1: Beginner Projects
|
|
||||||
|
* [Android AsyncHTTPClient](http://loopj.com/android-async-http/) - For asynchronous network requests
|
||||||
| Name | Short Description | Tier |
|
* [Picasso](http://square.github.io/picasso/) - For remote image loading
|
||||||
| ---------------------------------------------------------------------- | --------------------------------------------------------- | ---------- |
|
|
||||||
| [Bin2Dec](./Projects/Bin2Dec-App.md) | Binary-to-Decimal number converter | 1-Beginner |
|
|
||||||
| [Border Radius Previewer](./Projects/Border-Radius-Previewer.md) | Preview how CSS3 border-radius values affect an element | 1-Beginner |
|
|
||||||
| [Calculator](./Projects/Calculator-App.md) | Calculator | 1-Beginner |
|
|
||||||
| [Christmas Lights](./Projects/Christmas-Lights-App.md) | Simulate a string of Christmas lights | 1-Beginner |
|
|
||||||
| [Cause Effect App](./Projects/Cause-Effect-App.md) | Click list item to display item details | 1-Beginner |
|
|
||||||
| [Color Cycle](./Projects/Color-Cycle-App.md) | Cycle a color value through incremental changes | 1-Beginner |
|
|
||||||
| [Countdown Timer](./Projects/Countdown-Timer-App.md) | Event Countdown timer | 1-Beginner |
|
|
||||||
| [CSV2JSON App](./Projects/CSV2JSON-App.md) | CSV to JSON converter | 1-Beginner |
|
|
||||||
| [Dynamic CSS Variables](./Projects/Dynamic-CSSVar-app.md) | Dynamically change CSS variable settings | 1-Beginner |
|
|
||||||
| [First DB App](./Projects/First-DB-App.md) | Your first Database app! | 1-Beginner |
|
|
||||||
| [Flip Image](./Projects/Flip-Image-App.md) | Change the orientation of images across two axes | 1-Beginner |
|
|
||||||
| [GitHub Status](./Projects/GitHub-Status-App.md) | Display Current GitHub Status | 1-Beginner |
|
|
||||||
| [Hello](./Projects/Hello-App.md) | User native language greeting | 1-Beginner |
|
|
||||||
| [IOT Mailbox Simulator](./Projects/IOT-Mailbox-App.md) | Use callbacks to check your snail mail | 1-Beginner |
|
|
||||||
| [JSON2CSV App](./Projects/JSON2CSV-App.md) | JSON to CSV converter | 1-Beginner |
|
|
||||||
| [Key Value](./Projects/Key-Value-App.md) | Keyboard Event Values | 1-Beginner |
|
|
||||||
| [Lorem Ipsum Generator](./Projects/Lorem-Ipsum-Generator.md) | Generate lorem ipsum placeholder text | 1-Beginner |
|
|
||||||
| [Notes App](./Projects/Notes-App.md) | Create an online note pad | 1-Beginner |
|
|
||||||
| [Pearson Regression](./Projects/Pearson-Regression-App.md) | Calculate the correlation coefficient for two sets of data | 1-Beginner |
|
|
||||||
| [Pomodoro Clock](./Projects/Pomodoro-Clock.md) | Task timer to aid personal productivity | 1-Beginner |
|
|
||||||
| [:star2: Product Landing Page](./Projects/Product-Landing-Page.md) | Showcase product details for possible buyers | 1-Beginner |
|
|
||||||
| [Quiz App](./Projects/Quiz-App.md) | Test your knowledge by answering questions | 1-Beginner |
|
|
||||||
| [Recipe App](./Projects/Recipe-App.md) | Recipe | 1-Beginner |
|
|
||||||
| [Roman to Decimal Converter](./Projects/Roman-to-Decimal-Converter.md) | Convert Roman to Decimal numbers | 1-Beginner |
|
|
||||||
| [Slider Design](./Projects/Slider-Design.md) | Display images using a slider control | 1-Beginner |
|
|
||||||
| [Stopwatch App](./Projects/Stopwatch-App.md) | Count time spent on activities | 1-Beginner |
|
|
||||||
| [TrueOrFalse](./Projects/True-or-False-App.md) | Identify the result of a conditional comparison | 1-Beginner |
|
|
||||||
| [Vigenere Cipher](./Projects/Vigenere-Cipher.md) | Encrypt text using the Vigenere Cypher | 1-Beginner |
|
|
||||||
| [Wind Chill](./Projects/Windchill-App.md) | Calculate the windchill factor from an actual temperature | 1-Beginner |
|
|
||||||
| [Word Frequency](./Projects/Word-Frequency-App.md) | Calculate word frequency in a block of text | 1-Beginner |
|
|
||||||
|
|
||||||
### Tier-2: Intermediate Projects
|
|
||||||
|
|
||||||
| Name | Short Description | Tier |
|
|
||||||
| ------------------------------------------------------------------ | -------------------------------------------------- | -------------- |
|
|
||||||
| [Bit Masks](./Projects/Bit-Masks-App.md) | Using Bit Masks for Conditions | 2-Intermediate |
|
|
||||||
| [Book Finder App](./Projects/Book-Finder-App.md) | Search for books by multiple criteria | 2-Intermediate |
|
|
||||||
| [Card Memory Game](./Projects/Card-Memory-Game.md) | Memorize and match hidden images | 2-Intermediate |
|
|
||||||
| [Charity Finder App](./Projects/Charity-Finder-App.md) | Find a Global Charity to donate to | 2-Intermediate |
|
|
||||||
| [Drawing App](./Projects/Drawing-App.md) | Create digital artwork on the web | 2-Intermediate |
|
|
||||||
| [Emoji Translator App](./Projects/Emoji-Translator-App.md) | Translate sentences into Emoji | 2-Intermediate |
|
|
||||||
| [Flashcards App](./Projects/FlashCards-App.md) | Review and test your knowledge through Flash Cards | 2-Intermediate |
|
|
||||||
| [Flip Art App](./Projects/Flip-Art-App.md) | Animate a set of images | 2-Intermediate |
|
|
||||||
| [HighStriker Game](./Projects/HighStriker-Game.md) | Highstriker strongman carnival game | 2-Intermediate |
|
|
||||||
| [Markdown Previewer](./Projects/Markdown-Previewer.md) | Preview text formatted in GitHub flavored markdown | 2-Intermediate |
|
|
||||||
| [Markdown Table Generator](./Projects/Markdown-Table-Generator.md) | Convert a table into Markdown-formatted text | 2-Intermediate |
|
|
||||||
| [Meme Generator App](./Projects/Meme-Generator-App.md) | Create custom memes | 2-Intermediate |
|
|
||||||
| [Podcast Directory](./Projects/Podcast-Directory-App.md) | Directory of favorite podcasts | 2-Intermediate |
|
|
||||||
| [QR Code Badge Generator](./Projects/QRCode-Badge-App.md) | Encode badge info in a QRcode | 2-Intermediate |
|
|
||||||
| [Regular Expression Helper](./Projects/RegExp-Helper-App.md) | Test Regular Expressions | 2-Intermediate |
|
|
||||||
| [Sales Reciepts App](./Projects/Sales-DB-App.md) | Record Sales Receipts in a DB | 2-Intermediate |
|
|
||||||
| [Simple Online Store](./Projects/Simple-Online-Store.md) | Simple Online Store | 2-Intermediate |
|
|
||||||
| [Sports Bracket Generator](./Projects/Sports-Bracket-Generator.md) | Generate a sports bracket diagram | 2-Intermediate |
|
|
||||||
| [String Art](./Projects/String-Art.md) | An animation of moving, colored strings | 2-Intermediate |
|
|
||||||
| [Timezone Slackbot](./Projects/Timezone-Slackbot.md) | Display Team Timezones | 2-Intermediate |
|
|
||||||
| [To-Do App](./Projects/To-Do-App.md) | Manage personal to-do tasks | 2-Intermediate |
|
|
||||||
| [Typing Practice](./Projects/Typing-Practice-App.md) | Typing Practice | 2-Intermediate |
|
|
||||||
|
|
||||||
### Tier-3: Advanced Projects
|
|
||||||
|
|
||||||
| Name | Short Description | Tier |
|
|
||||||
| -------------------------------------------------------------- | ------------------------------------------------------------------- | ---------- |
|
|
||||||
| [Battleship Bot](./Projects/Battleship-Bot.md) | Create a Discord bot that plays Battleship | 3-Advanced |
|
|
||||||
| [Battleship Game Engine](./Projects/Battleship-Game-Engine.md) | Create a callable engine to play the Battleship game | 3-Advanced |
|
|
||||||
| [Boole Bots Game](./Projects/Boole-Bot-Game.md) | Battling Bots driven by Boolean algebra | 3-Advanced |
|
|
||||||
| [Calorie Counter](./Projects/Calorie-Counter-App.md) | Calorie Counter Nutrition App | 3-Advanced |
|
|
||||||
| [Chat App](./Projects/Chat-App.md) | Real-time chat interface | 3-Advanced |
|
|
||||||
| [Elevator](./Projects/Elevator-App.md) | Elevator simulator | 3-Advanced |
|
|
||||||
| [Fast Food Simulator](./Projects/FastFood-App.md) | Fast Food Restaurant Simulator | 3-Advanced |
|
|
||||||
| [Instagram Clone](./Projects/Instagram-Clone-App.md) | A clone of Facebook's Instagram app | 3-Advanced |
|
|
||||||
| [GitHub Timeline](./Projects/GitHub-Timeline-App.md) | Generate a timeline of a users GitHub Repos | 3-Advanced |
|
|
||||||
| [Kudos Slackbot](./Projects/Kudos-Slackbot.md) | Give recognition to a deserving peer | 3-Advanced |
|
|
||||||
| [Movie App](./Projects/Movie-App.md) | Browse, Find Ratings, Check Actors and Find you next movie to watch | 3-Advanced |
|
|
||||||
| [MyPodcast Library](./Projects/MyPodcast-Library-app.md) | Create a library of favorite podcasts | 3-Advanced |
|
|
||||||
| [NASA Exoplanet Query](./Projects/NASA-Exoplanet-Query.md) | Query NASA's Exoplanet Archive | 3-Advanced |
|
|
||||||
| [Shell Game](./Projects/Shell-Game.md) | Animated shell game | 3-Advanced |
|
|
||||||
| [Shuffle Deck](./Projects/Shuffle-Deck-App.md) | Evaluate different algorithms for shuffling a card deck | 3-Advanced |
|
|
||||||
| [Slack Archiver](./Projects/Slack-Archiver.md) | Archive Slack Messages | 3-Advanced |
|
|
||||||
| [Spell-It App](./Projects/SpellIt-App.md) | A twist on the classic Speak N Spell game | 3-Advanced |
|
|
||||||
| [Survey App](./Projects/Survey-App.md) | Define, conduct, and view a survey | 3-Advanced |
|
|
||||||
|
|
||||||
## Plans for the future
|
|
||||||
|
|
||||||
We are planning to add more and more projects to this repository. For this, we need your help! Find out how to contribute below. 👇
|
|
||||||
|
|
||||||
We are also planning to create a website where you can easily browse through all of the projects.
|
|
||||||
|
|
||||||
## Contribution
|
|
||||||
|
|
||||||
Any contributions are highly appreciated. :pray: You can contribute in two ways:
|
|
||||||
|
|
||||||
1. create an issue and tell us your idea :bulb:. Make sure that you use the **new idea** label in this case;
|
|
||||||
2. fork the project and submit a PR with your new idea. Before doing that, please make sure that you read and follow the [Contribution Guide](./CONTRIBUTING.md);
|
|
||||||
|
|
||||||
### Examples
|
|
||||||
|
|
||||||
You can also add your own examples to the projects after you have completed them. I highly encourage you to do this as it will show others what amazing things were built! 👍
|
|
||||||
|
|
||||||
## Spread the word!
|
|
||||||
|
|
||||||
If the information from this repo was useful to you in any way, make sure you give it a star 🌟, this way others can find it and benefit too! Together we can grow and make our community better! :smiley:
|
|
||||||
|
|
||||||
Do you have any suggestions on how we could improve this project overall? Let us know! We'd love to hear your feedback!
|
|
||||||
|
|
||||||
### Main Contributors 🙂🙂
|
|
||||||
|
|
||||||
- **Florin Pop**: [Twitter](https://twitter.com/florinpop1705) - [website](https://florin-pop.com).
|
|
||||||
- **Jim Medlock**: [Twitter](https://twitter.com/jd_medlock) - [articles](https://medium.com/@jdmedlock)
|
|
||||||
|
|
||||||
## Weekly Coding Challenge 🚀
|
|
||||||
|
|
||||||
As a bonus, there's a Weekly Coding Challenge where you can learn more by practicing your skills on real-world projects. Read [The Complete Guide](https://www.florin-pop.com/blog/2019/03/weekly-coding-challenge/) to find out how you can participate! 😄
|
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.android.tools.build:gradle:1.0.0'
|
||||||
|
|
||||||
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
// in the individual module build.gradle files
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
# Project-wide Gradle settings.
|
||||||
|
|
||||||
|
# IDE (e.g. Android Studio) users:
|
||||||
|
# Gradle settings configured through the IDE *will override*
|
||||||
|
# any settings specified in this file.
|
||||||
|
|
||||||
|
# For more details on how to configure your build environment visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
|
||||||
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
||||||
|
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||||
|
|
||||||
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
|
# org.gradle.parallel=true
|
@ -0,0 +1,164 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##
|
||||||
|
## Gradle start up script for UN*X
|
||||||
|
##
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn ( ) {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die ( ) {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||||
|
if $cygwin ; then
|
||||||
|
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >&-
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >&-
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="java"
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=$((i+1))
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
(0) set -- ;;
|
||||||
|
(1) set -- "$args0" ;;
|
||||||
|
(2) set -- "$args0" "$args1" ;;
|
||||||
|
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||||
|
function splitJvmOpts() {
|
||||||
|
JVM_OPTS=("$@")
|
||||||
|
}
|
||||||
|
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||||
|
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||||
|
|
||||||
|
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
@ -0,0 +1,90 @@
|
|||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:init
|
||||||
|
@rem Get command-line arguments, handling Windowz variants
|
||||||
|
|
||||||
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
|
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||||
|
|
||||||
|
:win9xME_args
|
||||||
|
@rem Slurp the command line arguments.
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
set _SKIP=2
|
||||||
|
|
||||||
|
:win9xME_args_slurp
|
||||||
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
|
set CMD_LINE_ARGS=%*
|
||||||
|
goto execute
|
||||||
|
|
||||||
|
:4NT_args
|
||||||
|
@rem Get arguments from the 4NT Shell from JP Software
|
||||||
|
set CMD_LINE_ARGS=%$
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
@ -0,0 +1 @@
|
|||||||
|
include ':app'
|
Loading…
Reference in new issue