Difference between revisions of "Antigravity.md"

From iDempiere en
Line 66: Line 66:
 
- Automatic build can cause conflict with mvn build. You might want to disable automatic build if you frequently use maven to run build or run unit test.
 
- Automatic build can cause conflict with mvn build. You might want to disable automatic build if you frequently use maven to run build or run unit test.
 
- Add **Customizations** rule to guide the agent on the running of mvn build and unit test for iDempiere:
 
- Add **Customizations** rule to guide the agent on the running of mvn build and unit test for iDempiere:
 +
 
```
 
```
 
**For running of unit test and integration test using maven**
 
**For running of unit test and integration test using maven**
Line 73: Line 74:
 
* Always run in terminal
 
* Always run in terminal
 
```
 
```
 +
 
- If you have an IDE or workspace settings that you can't locate the place to change it, try ask the agent to do it for you.
 
- If you have an IDE or workspace settings that you can't locate the place to change it, try ask the agent to do it for you.

Revision as of 00:16, 21 February 2026

Setup

  • Install from https://antigravity.google/
  • Switch to visual studio code marketpalce:
  • Install Extension Pack for Java extension
  • Install Eclipse PDE Support extension
  • File > Open Folder... , select iDempiere source folder
  • File > Add Folder to Workspace... , add idempiere-rest source folder to your workspace
  • File > Add Folder to Workspace... , add your other project source folder to your workspace
  • File > Save Workspace As... to save your workspace
    • add the following properties to "settings" in the save .code-workspace file to prevent unnecessary formatting only changes:
      "settings": {
          "editor.formatOnSave": false,
          "editor.formatOnType": false,
          "editor.formatOnPaste": false,
          "editor.codeActionsOnSave": {
              "source.fixAll": "never",
              "source.organizeImports": "never"
          },
          "files.eol": "auto",
          "files.trimTrailingWhitespace": false,
          "files.insertFinalNewline": false,
          "files.trimFinalNewlines": false
      }
  • Add the following to {idempiere source folder}/.git/info/exclude file:
    .project
    .vscode
    *.properties
    *.ks
    **/.settings/
    *.sh
    **/*.launch
    *.blacklist
    *.blacklist.*
    *.code-workspace
  • To set active target platform, right click on the target definition file (.target file) and select Reload Target Platform

Optional

  • Install Eclipse Keymap extension to use Eclipse Key Binding
  • Enable browser extension (Open Antigravity User Settings > Enable Browser Tools)
  • Install Gemini CLI: https://github.com/google-gemini/gemini-cli
  • Enable Gemini CLI integration with antigravity: /ide install
    • Note that this might be needed for /ide install: sudo ln -s /usr/bin/antigravity /usr/local/bin/agy
  • Install iDempiere examples for Gemini CLI
    • gemini skills install https://github.com/hengsin/idempiere-examples
  • Install iDempiere skills for Gemini CLI: https://github.com/hengsin/idempiere-skills
  • Add iDempiere mcp source folder to your workspace

What you still need from Eclipse

  • Create new launch configuration
  • Check and fix target platform state

Tips

  • There's no build in tool to create OSGi component XML file from annotation but you can ask the agent to do that for you.
  • To run a launch configuration, right click on launch configuration (.launch file) and select Debug PDE Application
    • An entry will be added to the launch.json file.
    • If the startup workspace folder is wrong, add the "cwd" property in launch.json to fix that.
    • If it is not launch with the intended Java runtime environment, add "javaExec" property in launch.json to set the Java runtime environment to use. This property should contain the absolute path of the Java executable to use (for e.g, "javaExec": "/usr/lib/jvm/java-17-temurin-jdk/bin/java").
    • After the first run, you can open the launch.json file, select Run > Start Debugging to run it.
  • Automatic build can cause conflict with mvn build. You might want to disable automatic build if you frequently use maven to run build or run unit test.
  • Add Customizations rule to guide the agent on the running of mvn build and unit test for iDempiere:
**For running of unit test and integration test using maven**
* Run from workspace root folder
* Set JAVA_HOME to /usr/lib/jvm/java-17-temurin-jdk
* mvn integration-test -DskipTests=false -DmaterializeProduct=none -DassembleRepository=none -Dtest=**test class name**
* Always run in terminal
  • If you have an IDE or workspace settings that you can't locate the place to change it, try ask the agent to do it for you.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.