mirror of
https://github.com/HighCapable/Gropify.git
synced 2025-12-15 15:41:24 +08:00
docs: update quick-start
This commit is contained in:
@@ -443,6 +443,12 @@ android {
|
||||
// - Note: If you disable this option, please make sure that there are no other projects
|
||||
// that also use or not only Gropify to generate code to avoid conflicts.
|
||||
isIsolationEnabled = true
|
||||
|
||||
// Whether to use manifest placeholders' generation.
|
||||
//
|
||||
// Disabled by default, when enabled will synchronize the properties' key-values
|
||||
// to the `manifestPlaceholders` in the `android` configuration method block.
|
||||
manifestPlaceholders = false
|
||||
}
|
||||
```
|
||||
|
||||
@@ -638,6 +644,7 @@ In Android projects, many repetitive and fixed properties usually need to be con
|
||||
|
||||
```properties
|
||||
project.namespace=com.highcapable.gropifydemo
|
||||
project.appName=Gropify Demo
|
||||
project.compileSdk=36
|
||||
project.targetSdk=36
|
||||
project.minSdk=26
|
||||
@@ -661,6 +668,24 @@ android {
|
||||
}
|
||||
```
|
||||
|
||||
When you set `manifestPlaceholders = true`, Gropify will automatically synchronize these properties' key-values to `manifestPlaceholders` in the android configuration method block.
|
||||
|
||||
You can then use these placeholders directly in `AndroidManifest.xml`.
|
||||
|
||||
> The following example
|
||||
|
||||
```xml
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application
|
||||
android:label="${project.appName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
|
||||
...
|
||||
</application>
|
||||
</manifest>
|
||||
```
|
||||
|
||||
You no longer need to use `buildConfigField` to add code to `BuildConfig`. With the property key-value code generated by `Gropify`, you can manage your project more flexibly.
|
||||
|
||||
You can also use interpolation `${...}` in property key-values to reference each other's content, but recursive references are not allowed.
|
||||
|
||||
Reference in New Issue
Block a user