Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wswenyue/autogeneratecode
A gradle plugin that generates code automatically
https://github.com/wswenyue/autogeneratecode
android autocomplete generate-code gradle-plugin
Last synced: about 2 months ago
JSON representation
A gradle plugin that generates code automatically
- Host: GitHub
- URL: https://github.com/wswenyue/autogeneratecode
- Owner: wswenyue
- License: bsd-2-clause
- Created: 2022-09-19T09:26:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-09T15:06:49.000Z (about 2 years ago)
- Last Synced: 2024-04-16T20:04:21.798Z (9 months ago)
- Topics: android, autocomplete, generate-code, gradle-plugin
- Language: Kotlin
- Homepage: http://wswenyue.vip/AutoGenerateCode/
- Size: 421 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AutoGenerateCodePlugin
## Introduction
**A gradle plugin that generates code automatically**## Using AutoGenerateCodePlugin
Add the plugin section in your root project `build.gradle` file :
```gradle
plugins {
id 'vip.wswenyue.AutoGenerateCode' version '0.1.0' apply false
}
```And apply it in the app module `build.gradle` file :
```gradle
plugins {
id 'vip.wswenyue.AutoGenerateCode'
}
```### Configuration
Configure in any module you want to use. Add the following sample content to the `gradle.properties` file```properties
agc.outDir=src/main/java
agc.className=TestBuildConfig
agc.package=com.wswenyue
agc.string.fields.key1=value1
agc.string.fields.TEST_KEY=value2
```After build you will get:
![](http://wswenyue.vip/AutoGenerateCode/assets/img/result.d0a83088.jpg)
Finally, don't forget to add Git ignore
```.gitignore
src/main/java/com/wswenyue/TestBuildConfig.java
```## License
[BSD 2-Clause "Simplified" License](https://github.com/wswenyue/AutoGenerateCode/blob/main/LICENSE)