andcre


Source link: https://github.com/fooock/andcre

andcre

Andcre (android creator) is a python script to create professional and ready to use Android projects.

"Project created with andcre"

Requirements

andcre works with python3

Getting started

First clone this repo

$ git clone https://github.com/fooock/andcre.git $ cd andcre

Now install the dependencies

$ pip3 install -r requirements.txt

Create the environment variable ANDCRE to point to your android workspace. This is where the projects will be created.

$ export ANDCRE=/home/user/AndroidProjects

If the environment variable is not found, the program will request it every time a new project is created

Execute the script or set the andcre.bat or andcre to the $PATH to execute this program from any place!

Features

andcre create android projects with a lot of useful files and tools. It include support for android lint, findbugs, checkstyle and pmd. Automatically create a git repo, add all project files, commit and create the first tag.

Project files

  • Create automatically a README.md file, that contains the project name.
  • Create a CHANGELOG.md file and automatically write the name of the current version and the current date
  • Create the TODO.md file
  • Create LICENSE file
  • Create the .gitignore file with the common android ignored files/directories
  • Create the root build.gradle file

Build system

The andcre script create a folder in the root project directory called buildsystem. It contains three files:

  • dependencies.gradle: Contains the dependencies of the project (test dependencies and application dependencies)
  • version.gradle: Contain all things related to the project version
  • project.gradle: Project properties like target sdk, build tools version etc

The version.gradle file is based in this great post from Dmytro Danylyk on hackernoon

Gradle wrapper

The gradle version used is the gradle-3.5.1

Quality tools

In the project root, a directory called quality is created. It contains all files needed to execute the static analysis tools and style checkers like findbugs, checkstyle, pmd and android lint. To generate all these reports execute

$ ./gradlew check

Note that if you add more modules to the project, this task is applied. The reports are generated in the <project>/app/build/reports directory

All quality files are from this fantastic repo!

App debug options

The application create a custom DefaultApplication for the debug builds and initialize for default custom configurations not needed in application releases. The debug options are:

  • Initialize Timber with the Timber.DebugTree()
  • Detect all kind of problems and log it using the StrictMode.setThreadPolicy() and StrictMode.setVmPolicy methods.
  • Setup LeakCanary. Only compile in debugCompile (see app/build.gradle)

Note: This configuration only applies to debug builds!

Git

When the project is created a new git repository is initialized. You can use the gradle task printVersion to check out it.

App module

For default the AndroidManifest.xml has the INTERNET permission. For each build type (debug/release) a DefaultApplication is created with different log configurations.

  • For the debug type a Timber.DebugTree() is initialized.
  • For the release type a custom CrashReportingTree() is created. This tree discards automatically all DEBUG and VERBOSE logs, and can be able to report all errors and warnings using the CrashLibrary class

The applicatiod id for the debug build type has the .debug suffix.

Apk generation

All apk's are generated in the build/outputs/apk directory. The name of the apk correspond to the project name with the current version. For example, your module name is app, and the version is 0.1, the resulting apk's will be:

  • For the debug build type: app-0.1-debug.apk
  • For the release build type: app-0.1-release.apk

Include open source notices

The play-services-oss-licenses library is included to show the list of licenses used by the libraries included in the application. To show the list you only need to call the code:

final Intent intent = new Intent(this, OssLicensesMenuActivity.class);
 startActivity(intent);

You can change the activity title. For more info see the documentation

Final Android project

The result project structure is like this:

Suggestions

Open an issue or create a new pull request

License

Copyright 2017 newhouse (nhitbh at gmail dot com)  Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 

Resources

Under the Hood is a flexible and powerful Android debug view library. It uses a modular template system that can be easily extended to your needs, although coming with many useful elements built-in.

There is a lot of "default" debug data that can be easily embedded (e.g. current runtime-permission status, app version and device info). There are 2 basic themes (dark and light) which can be customized to your needs.

Sticky header view or suspending view for RecyclerView. RecyclerStickyHeaderView is an Android library that makes it easy to integrate section headers stick to the top in RecyclerView.

Official Google Actions SDK is written in Node.js. But in many situations voice interfaces like Google Home or Google Assistant will extend or replace mobile apps. If you are old fashioned Android engineer and the most of your code is already written in Java, why not reuse it and build voice extension to app on your own? And this is the main reason to build Google Actions Java SDK - enabling as much developers as possible to build their brilliant ideas for Google Assistant and Home.

Currently this is just working proof of concept of Google Actions Java SDK. It means that there is no documentation, fixed interface, (not much) unit tests and many, many others.

Google Actions Java SDK is build based on official Node.js library, but it's not a mirror copy of it. The goal is to make it fully compatible with Conversational Protocol of Assistant Platform.

Applozic Android Video Calling SDK lets you integrate video call, audio call, real time chat and in-app messaging in just few lines of code.

A versatile layout that fades its edges regardless of child view type.

WDate is a short way utility class that wraps the standard Date class, providing many useful methods without using the Calendar object.

This class aims to help developers to avoid writing boring DateUtils classes for every project.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes