Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gtroshin/gradle-java-metadata-plugin
Gradle `java-metadata` plugin that reads all Java files and extracts the "metadata".
https://github.com/gtroshin/gradle-java-metadata-plugin
Last synced: about 2 months ago
JSON representation
Gradle `java-metadata` plugin that reads all Java files and extracts the "metadata".
- Host: GitHub
- URL: https://github.com/gtroshin/gradle-java-metadata-plugin
- Owner: gtroshin
- Created: 2023-07-24T12:33:44.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-07-24T12:35:01.000Z (over 1 year ago)
- Last Synced: 2023-07-24T14:13:01.332Z (over 1 year ago)
- Language: Java
- Size: 170 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gradle `java-metadata` plugin
Gradle `java-metadata` plugin that reads all Java files and extracts the "metadata".
# Documentation
## About
The project has a [custom Gradle plugin, `JavaMetadataPlugin`, which](buildSrc/src/main/kotlin/JavaMetadataPlugin.kt) extends the Java project building by generating metadata for Java files in your project. The metadata includes the following information: "package name", "file name", and "number of lines of code", they are automatically added to the JAR files, extending in code analysis and debugging.
## Development
### Requirements:
- JDK 11 or newer: it can be downloaded from the official Oracle website or install via a package manager like Homebrew on MacOS or apt on Ubuntu.
- Gradle 7.2 or newer: This is the build tool used for this project. It can be downloaded from the official Gradle website or installed via a package manager.To start developing, please clone the project and then run the plugin using the provided Gradle Wrapper:
```bash
git clone
cd
./gradlew clean build
./gradlew extractJavaMetadata # default command to run plugin
./gradlew extractJavaMetadata -Pseparator=';' # to use a semicolon as the separator```
For testing the plugin, run [the following Bash script](test_metadata_plugin.sh) in the project root folder:
```bash
./test_metadata_plugin.sh
```