Inspector


Source link: https://github.com/jakeouellette/inspector

Inspector

Gradle build inspector, clarifies what's going on inside your Gradle build. Features:

  • Makes it easy to understand your task dependencies by generating a task dependency graph.

  • Makes it easy to know what files have changed on disk by running diff (windows not supported)

  • (incubating) Compare the differences in file changes on disk between two builds by using -PcompareLastBuild

Usage

Easy Setup: Navigate to the the Gradle Plugin Repository. Follow the directions hosted there to set up the latest release.

To install from source: Checkout and install locally:

> ./gradlew install 

Then, add the plugin and mavenLocal() to your build:

buildscript {

  repositories {

mavenLocal()
  
}

  dependencies {

classpath 'com.jakeout:gradle-inspector:+'
  
}
 
}

allprojects {

  apply plugin: 'com.jakeout.gradle-inspector' 
}
 

Features

Understanding Gradle Task graphs can be challenging. Gradle typically outputs a linear view of all of the tasks run during a build, with no sense of time or dependencies.

The Gradle build inspector elucidates the task graph by displaying it as a canvas directed-acyclic-graph using d3 as a rendering engine with dagre as a layout manager. Uses Kotlinx.html to generate html.

Inspector generates a task graph for each app / library it is applied to, and will attempt to link them if you apply it to all projects in a hierarchy.

Each task can be clicked and explored deeper. Tasks are colored "green" if they only have declared changes on disk. Tasks are colored blue if they have unexpected / undeclared side effects. A Gradle clean task deletes things, and therefore their removal is not explicitly declared as part of its output, though, most other gradle tasks are additive and so this can help identify missed side-effects.

Inspector is not intended to be a fast build tool. It shells out to the command line to run diff and outputs a buildProfile folder, caching the build folder after EVERY task runs. This means that it can be slow with large builds.

The shell'd out Diff output is read using Zutubi Diff, and

Diff report features:

  • new / fixed Show non-text files! -- Show files that have been added or deleted by a task. Show images / media content that change

  • Diffs files -- A handful of lines of files are shown, the rest are hidden and can be expanded.

  • Diffs between two builds -- compare the differences (e.g., compare two Gradle builds, before and after Gradle is updated). Currently, only tasks for the second build are shown in the directed acyclic graph.

  • Identify other running tasks and warns when diff may be inaccurate. Diff actions run at the start and end of each task, so if other tasks are running simultaneously, build behavior may produce strange outputs. (turning off parallel is recommended unless profiling this explicitly)

Output rows have red icons of files with questions marks (provided by Font awesome ) if they were not declared by the Gradle task. If the output was declared, but it was a folder, not a file, it has a subtle border splitting it from the child files that were modified within that declared folder.

Optional Properties

Run with -PpropertyName to enable

  • showInspection: to auto-open the web URL.

  • (incubating) compareLastBuild: Generates a report comparing this build's inputs and outputs against the last build you made. These changes are written to the report page for each task (above the normal report.) This can be handy (e.g., if you're trying to figure out what is different about a new version of a Gradle plugin.) This feature is slower and more disk intensive, because of great caching and comparisons being made.

Resources

Android Loaders for the rest of us.

The concept of loaders in Android is pretty great: a way to do async work in a lifecycle-aware way. Unfortunately, the implementation is pretty bad. Loadie attempts to fix this in several ways.

Providing swipe feature for android applications.

You can now select a date and a time with only one widget!

A sample Android application to demonstrate how to build screens as fully independent modules.

It relies on a Finite State Machine (EasyFlow), to handle screens as states and trigger/consume events. Events allow the application to handle navigation between screens. The global context of the FSM is used to pass arguments as a Bundle. It also shows how to use dependency injection (via Dagger 2 for example) in modules.

This way:

  • modules are fully independent
  • modules declare the dependencies they need
  • modules declare the states they correspond to
  • modules declare the events that can be triggered
  • the hosting application sets up the states it uses (i.e., "screens")
  • the hosting application sets up how to navigation between states (with events)
  • the hosting application sets up the dependency injection mechanism

One of the fastest caching libraries for Java. Lots of features for advanced integrations of external systems: (Variable entry) expiry, exception handling with configurable resilience, loaders/writers, events, statistics. Configuration can also be done via XML (optional feature).

SimpleTabBar is customizable tab bar for viewpager

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