Giter Club home page Giter Club logo

android-studio-poet's Introduction

Android Studio Poet

alt text

Optimise your Android Studio builds, by creating generated projects. Inspired by GradleBuildExperiment. A tool to generate real life Java and Kotlin Android projects to analyze and improve build times.

Create a real life complexity Android project that mimics your own and observe the build times. If the build times of the generated project are way smaller than yours, it might be worth inspecting deeply your build configs and optimize.

Features

  • Configurable number of modules
  • Configurable number of packages
  • Configurable number of classes
  • Configurable number of inter module dependencies
  • Android resources (images, strings, activities, layouts)
  • Configure how to generate UI layer code
  • Configurable version of Gradle, Kotlin, the Android Gradle Plugin
  • Experimental Bazel support
  • Compose and DataBinding support

Download & Run

IntelliJ IDEA/Android Studio

  1. Clone the project
  2. Open and run in your IDE

Standalone Jar

Grab the latest JAR and run java -jar as-poet.jar.

Command line arguments

Android Studio Poet supports the following command line arguments

  1. Config - just run java -jar as-poet.jar MyConfig.json
  2. Folder with configs - just run java -jar as-poet.jar <path to a folder with configs> Android Studio Poet will crawl the folder recursively and execute each config in turn.

Build & Run

  1. Clone the repo
  2. ./gradlew aspoet:fatJar
  3. java -jar aspoet/build/libs/aspoet-all.jar

How

  • The generated sources will include the basic functionality of method calling both in class itself and between the generated classes, both in Java and Kotlin

  • The generated build.gradle files will include other modules as dependencies

  • You can control Android resources (images, layouts etc')

  • You can control product flavors

  • You can have both source and resources inter-module dependencies

UI layer configurations

  • Specify dataBindingConfig for Data Binding
    • It has a property listenerCount to indicate the number of data variables.
    • It has a property kapt to specify whether we want to use Java Annotation Processor or Kapt to process data bindings.
  • Specify viewBinding for View Binding.
  • Specify composeConfig for Compose.
    • It has a property actionCount to indicate the number of clickable actions.
  • If nothing above is specified, the UI layer code will be traditional XML-based layout.
  • Errors will be thrown when two of the above config is specified.

This is not an official Google product.

License

Copyright 2021 Google Inc.

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

https://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.

android-studio-poet's People

Contributors

bootstraponline avatar borisf avatar gharrma avatar i-cat avatar jaredsburrows avatar jin avatar louiscad avatar nikitakozlov avatar rajendraarora16 avatar runningcode avatar srmurguia avatar zacsweers avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.