All Projects → pocmo → Recompose

pocmo / Recompose

Licence: apache-2.0
recompose is a tool for converting Android layouts in XML to Kotlin code using Jetpack Compose.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Recompose

Dinocompose
Chrome's Dino T-Rex game developed in Jetpack Compose
Stars: ✭ 170 (-42.18%)
Mutual labels:  hacktoberfest, compose
Collector Intellij
A PhpStorm plugin for refactoring to collections
Stars: ✭ 114 (-61.22%)
Mutual labels:  hacktoberfest, intellij
Downlords Faf Client
Official client for Forged Alliance Forever
Stars: ✭ 121 (-58.84%)
Mutual labels:  hacktoberfest, intellij
Jetquotes
🔖 A Quotes Application built to Demonstrate the Jetpack Compose UI
Stars: ✭ 179 (-39.12%)
Mutual labels:  hacktoberfest, compose
Magento2 Phpstorm Plugin
PHPStorm Plugin for Magento 2
Stars: ✭ 294 (+0%)
Mutual labels:  hacktoberfest, intellij
Aboutlibraries
AboutLibraries automatically detects all dependencies of a project and collects their information including the license. Optionally visualising it via the provided ui components.
Stars: ✭ 2,777 (+844.56%)
Mutual labels:  hacktoberfest, compose
Awesome Jetpack Compose Android Apps
👓 A curated list of awesome Jetpack Compose android apps by open-source contributors.
Stars: ✭ 207 (-29.59%)
Mutual labels:  hacktoberfest, compose
Awesome Jetpack Compose Learning Resources
👓 A continuously updated list of learning Jetpack Compose for Android apps.
Stars: ✭ 275 (-6.46%)
Mutual labels:  hacktoberfest, compose
Terasology
Terasology - open source voxel world
Stars: ✭ 3,247 (+1004.42%)
Mutual labels:  hacktoberfest
Termimad
A library to display rich (Markdown) snippets and texts in a rust terminal application
Stars: ✭ 293 (-0.34%)
Mutual labels:  hacktoberfest
Idea Android Studio Plugin
Android Studio Plugin
Stars: ✭ 293 (-0.34%)
Mutual labels:  intellij
Vulcain
Fast and idiomatic client-driven REST APIs.
Stars: ✭ 3,190 (+985.03%)
Mutual labels:  hacktoberfest
Libplanet
Blockchain core in C#/.NET for persistent peer-to-peer online games
Stars: ✭ 293 (-0.34%)
Mutual labels:  hacktoberfest
Pokemon Showdown
Pokémon battle simulator.
Stars: ✭ 3,393 (+1054.08%)
Mutual labels:  hacktoberfest
Nord Jetbrains
An arctic, north-bluish clean and elegant JetBrains IDE UI and editor color theme.
Stars: ✭ 293 (-0.34%)
Mutual labels:  intellij
Timeago.dart
A library useful for creating fuzzy timestamps. (e.g. "5 minutes ago")
Stars: ✭ 293 (-0.34%)
Mutual labels:  hacktoberfest
Vinyldns
DNS Governance for streamlining DNS operations and enabling safe and secure DNS self-service
Stars: ✭ 293 (-0.34%)
Mutual labels:  hacktoberfest
Glportal
🎮 Open Source teleportation based first person puzzle-platformer
Stars: ✭ 297 (+1.02%)
Mutual labels:  hacktoberfest
Terraform Provider Digitalocean
Terraform DigitalOcean provider
Stars: ✭ 296 (+0.68%)
Mutual labels:  hacktoberfest
Mongo Sync
Sync Remote and Local MongoDB Databases 🔥
Stars: ✭ 293 (-0.34%)
Mutual labels:  hacktoberfest

recompose

recompose is a tool for converting Android layouts in XML to Kotlin code using Jetpack Compose. It can be used on the command line, as IntelliJ / Android Studio plugin or as a library in custom code.

Running

IntelliJ / Android Studio plugin

The plugin does not get published yet. If you want to try them then you'll have to build them from code. Use the Gradle task runIde to run a test IDE with the plugin installed or create an installable plugin with the buildPlugin task. The plugin zip will be placed in recompose-idea/build/distributions/. To learn how to install it, read the Install plugin from disk section in the IntelliJ docs.

Command-line interface (CLI)

Like the plugin, the command-line interface does not get published yet. You can run it directly from Gradle via ./gradlew recompose-cli:run --args="list file paths..". Alternatively you can run the assembleDist which will place a zip/tar containing a binary into recompose-cli/build/distributions/.

Usage: recompose [OPTIONS] INPUT...

Options:
  -o, --output PATH  Output directory for Kotlin code
  -h, --help         Show this message and exit

Arguments:
  INPUT  Layout XML files to convert to Kotlin

Building

Either import the project into IntelliJ IDEA or use Gradle on the command line (via the provided gradlew wrapper).

Modules

  • recompose-ast: Contains the data classes for the Abstract Syntax Tree (AST) representing a parsed XML layout.
  • recompose-cli: A command-line interface (CLI) for running recompose in a shell.
  • recompose-composer: Responsible for taking an AST and transforming it into the equivalent Composable Kotlin code.
  • recompose-idea: An IntelliJ IDEA / Android Studio plugin that allows copying XML layouts and pasting as Composable Kotlin code.
  • recompose-test: Contains test data and helpers for unit tests.

Important gradle tasks

  • clean: Deletes the build directories.
  • test: Runs all unit tests in all modules.
  • runIde: Runs IntelliJ IDEA with the plugin installed.
  • buildPlugin: Builds the IntelliJ / Android Studio plugin and makes it available in recompose-idea/build/distributions.

How does this work?

The Parser (recompose-parser) takes the input XML and transforms it into an Abstract Syntax Tree (recompose-ast). The Composer (recompose-composer) takes the AST and translates it into Kotlin code calling Composables.

The IntelliJ / Android Studio plugin (recompose-idea) uses that to perform the translation when pasting copied XML code. And the CLI (recompose-cli) uses it to translate files.

Can I contribute?

Yes, absolutely. There are a ton of Views and attributes to support. The list of issues labeled with good first issue are a good place to start. An issue from the list labeled with help wanted may be a good follow-up. Just comment on any issue that interests you.

License

Copyright 2020 Sebastian Kaspari

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.
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].