|
1 | | - |
2 | 1 | <p align="center"> |
3 | 2 | <a href="https://forma.tools" target="_blank" rel="noopener noreferrer"><img width="100" src="./img/press.svg" alt="Logo"></a> |
4 | 3 | </p> |
|
18 | 17 | <img alt="GitHub top language" src="https://img.shields.io/github/languages/top/formatools/forma"/> |
19 | 18 | <img alt="GitHub closed pull requests" src="https://img.shields.io/github/issues-pr-closed/formatools/forma"/> |
20 | 19 | <img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/formatools/forma?style=social"/> |
21 | | -</p> |
| 20 | +</p> |
22 | 21 |
|
23 | | -**Forma** - Kotlin first, Meta Build System with Android and Gradle support. Opinionated, scalable, thoughtfully structured, type-safe and guided way to declare your project structure. Distributed as a Gradle plugin, Forma helps developers to shift focus from `Build Configuration` to `Project Structure Declaration`, abstracting away build configuration complexity. |
| 22 | +**Forma** - Kotlin first, Meta Build System with Android and Gradle support. Opinionated, scalable, thoughtfully |
| 23 | +structured, type-safe and guided way to declare your project structure. Distributed as a Gradle plugin, Forma helps |
| 24 | +developers to shift focus from `Build Configuration` to `Project Structure Declaration`, abstracting away build |
| 25 | +configuration complexity. |
24 | 26 |
|
25 | 27 | - You don't need to be a gradle expert anymore |
26 | 28 | - Get rid of project configuration bad practices |
|
32 | 34 | - Extensible - be the expert when you need to! |
33 | 35 | - And much more... |
34 | 36 |
|
35 | | -⚠️ We are using `target` term to express application components(e.g. modules or projects, depending in the context) across documentation and code, there is couple of reasons for that. `Module` term often confused with Dagger modules which makes communication harder, `project` from the other hand used only in Gradle context but not in other build systems like Buck and Bazel. |
| 37 | +⚠️ We are using `target` term to express application components(e.g. modules or projects, depending in the context) |
| 38 | +across documentation and code, there is a couple of reasons for that. `Module` term often confused with Dagger modules |
| 39 | +which makes communication harder, `project` from the other hand used only in Gradle context but not in other build |
| 40 | +systems like Buck and Bazel. |
36 | 41 |
|
37 | 42 | ⚠️ This is early *alpha* release - please do try this at home🏠 |
38 | 43 |
|
39 | | -Easiest way to start is here >> ‼️ https://github.com/stepango/FormaShowcase ‼️ |
40 | | - |
41 | 44 | [Presentation Link](https://www.beautiful.ai/player/-MLn7RnBBWeh7vePDoDq) |
42 | 45 |
|
43 | | -Configuration made easy (Gradle 6.8+): |
44 | | -```gradle |
45 | | -// settings.gradle.kts |
46 | | -dependencyResolutionManagement { |
47 | | - @Suppress("UnstableApiUsage") |
48 | | - repositories { |
49 | | - google() |
50 | | - jcenter() |
51 | | - } |
52 | | -} |
53 | | -
|
54 | | -``` |
55 | | - |
| 46 | +Configuration made easy: |
56 | 47 |
|
57 | 48 | ``` gradle |
58 | 49 | // root build.gradle.kts |
59 | | -buildscript { |
| 50 | +pluginManagement { |
60 | 51 | repositories { |
61 | 52 | google() |
| 53 | + gradlePluginPortal() |
| 54 | + mavenCentral() |
62 | 55 | } |
63 | 56 | } |
64 | 57 |
|
65 | 58 | plugins { |
66 | | - id("tools.forma.android") version "0.0.1" |
| 59 | + id("tools.forma.android") version "0.1.3" |
67 | 60 | } |
68 | 61 |
|
69 | 62 | // Configure shared aspects of your android Project |
70 | | -androidProjectConfiguration( |
71 | | - minSdk = 21, |
72 | | - targetSdk = 29, |
73 | | - compileSdk = 29, |
74 | | - kotlinVersion = "1.4.10", |
75 | | - agpVersion = "4.0.0", |
76 | | - versionCode = 1, |
77 | | - versionName = "1.0" |
78 | | -) |
| 63 | +buildscript { |
| 64 | + androidProjectConfiguration( |
| 65 | + project = project, |
| 66 | + minSdk = 21, |
| 67 | + targetSdk = 33, |
| 68 | + compileSdk = 33, |
| 69 | + agpVersion = "7.4.2", |
| 70 | + dataBinding = true, |
| 71 | + extraPlugins = listOf( |
| 72 | + "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3", |
| 73 | + "com.google.firebase:firebase-crashlytics-gradle:2.9.4", |
| 74 | + ) |
| 75 | + ) |
| 76 | +} |
79 | 77 | ``` |
80 | 78 |
|
81 | 79 | Your kotlin android library |
@@ -105,24 +103,25 @@ androidLibrary( |
105 | 103 | ) |
106 | 104 | ) |
107 | 105 | ``` |
| 106 | + |
108 | 107 | ## Progress |
109 | 108 |
|
110 | | -| Supported target types | implemented | purpose | validation | |
111 | | -|:-----------------------------:|:-----------:|:------------------------:|:-----------: |
112 | | -| androidBinary | ✅ | Genearte single APK | ✅ | |
113 | | -| androidApp | ✅ | Application class | partial | |
114 | | -| androidLibrary | ✅ | Android library | partial | |
115 | | -| dataBinding | ✅ | Data Binding Layouts | partial | |
116 | | -| dataBindingAdapters | ✅ | Data Binding Adapters | partial | |
117 | | -| androidWidget | ✅ | Custom View | partial | |
118 | | -| androidRes | ✅ | Resources Only | ✅ | |
119 | | -| androidTestUtils | ✅ | Shared code for Android tests |✅ | |
120 | | -| androidUtils | ✅ | Library extensions | partial | |
121 | | -| testUtils | ✅ | Shared code for unit tests | ✅ | |
122 | | -| utils | ✅ | JVM Library extensions | partial | |
123 | | -| library | ✅ | JVM Library | partial | |
124 | | -| api | ✅ | Feature external API's | partial | |
125 | | -| impl | ✅ | Feature implementation | partial | |
126 | | - |
127 | | - |
128 | | -Icons made by <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> |
| 109 | +| Supported target types | implemented | purpose | validation | |
| 110 | +|:----------------------:|:-----------:|:-----------------------------:|:----------:| |
| 111 | +| androidBinary | ✅ | Genearte single APK | ✅ | |
| 112 | +| androidApp | ✅ | Application class | partial | |
| 113 | +| androidLibrary | ✅ | Android library | partial | |
| 114 | +| dataBinding | ✅ | Data Binding Layouts | partial | |
| 115 | +| dataBindingAdapters | ✅ | Data Binding Adapters | partial | |
| 116 | +| androidWidget | ✅ | Custom View | partial | |
| 117 | +| androidRes | ✅ | Resources Only | ✅ | |
| 118 | +| androidTestUtils | ✅ | Shared code for Android tests | ✅ | |
| 119 | +| androidUtils | ✅ | Library extensions | partial | |
| 120 | +| testUtils | ✅ | Shared code for unit tests | ✅ | |
| 121 | +| utils | ✅ | JVM Library extensions | partial | |
| 122 | +| library | ✅ | JVM Library | partial | |
| 123 | +| api | ✅ | Feature external API's | partial | |
| 124 | +| impl | ✅ | Feature implementation | partial | |
| 125 | + |
| 126 | +Icons made by <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> |
| 127 | +from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> |
0 commit comments