{"id":20183683,"url":"https://github.com/glavo/module-info-compiler","last_synced_at":"2025-04-10T05:26:09.396Z","repository":{"id":134537895,"uuid":"479630897","full_name":"Glavo/module-info-compiler","owner":"Glavo","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-24T16:10:17.000Z","size":222,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T06:51:42.144Z","etag":null,"topics":["compiler","java","jpms","module","module-info"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Glavo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-04-09T05:43:58.000Z","updated_at":"2024-12-15T09:29:37.000Z","dependencies_parsed_at":"2023-11-15T04:28:31.287Z","dependency_job_id":"ba659379-3ebd-460f-a804-f9e5a9017e76","html_url":"https://github.com/Glavo/module-info-compiler","commit_stats":null,"previous_names":["glavo/gmic"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glavo%2Fmodule-info-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glavo%2Fmodule-info-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glavo%2Fmodule-info-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glavo%2Fmodule-info-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Glavo","download_url":"https://codeload.github.com/Glavo/module-info-compiler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248162153,"owners_count":21057703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","java","jpms","module","module-info"],"created_at":"2024-11-14T02:46:56.624Z","updated_at":"2025-04-10T05:26:09.359Z","avatar_url":"https://github.com/Glavo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Module Info Compiler\n[![](https://img.shields.io/maven-central/v/org.glavo/module-info-compiler?label=Maven%20Central)](https://search.maven.org/artifact/org.glavo/module-info-compiler)\n[![](https://img.shields.io/gradle-plugin-portal/v/org.glavo.compile-module-info-plugin)](https://plugins.gradle.org/plugin/org.glavo.compile-module-info-plugin)\n\nA tool for compiling `module-info.java` for Java alone. \n\nIt can easily compile `module-info.java` for your Java 8 project to fit JPMS without complicated module path configuration.\n\nIt can be used as a dependency library, as a command line tool, or as a [**Gradle plugin**](https://plugins.gradle.org/plugin/org.glavo.compile-module-info-plugin).\n\nIt only parses the syntax of `module-info.java` without checking the actual module,\nso it compiles without configuring the module path.\n\nThis tool does not depend on javac, it can run on Java 8 or higher, and you can configure the major version of the target class file.\n\n## Usage\n\n### Gradle Plugin\n\nUsing the plugins:\n\nGroovy DSL:\n```groovy\nplugins {\n  id \"org.glavo.compile-module-info-plugin\" version \"2.0\"\n}\n```\n\n\nKotlin DSL:\n```kotlin\nplugins {\n  id(\"org.glavo.compile-module-info-plugin\") version \"2.0\"\n}\n```\n\nIt takes over compiling `module-info.java`, so you can easily mix `module-info.java` in your Java 8 project.\n\nYou can also do some configuration like this:\n\n```kotlin\ntasks.named\u003corg.glavo.mic.tasks.CompileModuleInfo\u003e(\"compileModuleInfo\") {\n    targetCompatibility     = 9             // Optional, defaults to 9\n    encoding                = \"UTF-8\"       // Optional, defaults to UTF-8\n    moduleVersion           = \"1.0.0\"       // Optional\n    moduleMainClass         = \"simple.Main\" // Optional\n}\n```\n\nHere is a sample project: [Glavo/compile-module-info-sample](https://github.com/Glavo/compile-module-info-sample)\n\n### Use as a CLI tool\n\nDownload the jar from the [release page](https://github.com/Glavo/module-info-compiler/releases/),\nrun it with `java -jar module-info-compiler.jar`.\n\nThe parameters it accepts are as follows:\n\n```\nUsage: gmic [-target \u003ctarget compatibility\u003e] [-main-class \u003cmodule main class\u003e] [-module-version \u003cmodule version\u003e] \u003csource file\u003e \u003ctarget file\u003e\n```\n\n### Added as a Maven dependency\n\nThis tool has been published on Maven Central, you can add dependencies to it like this:\n\nMaven:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.glavo\u003c/groupId\u003e\n    \u003cartifactId\u003emodule-info-compiler\u003c/artifactId\u003e\n    \u003cversion\u003e2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nGradle:\n\n```kotlin\nimplementation(\"org.glavo:module-info-compiler:2.0\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglavo%2Fmodule-info-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglavo%2Fmodule-info-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglavo%2Fmodule-info-compiler/lists"}