Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

theVerySharpFlat/gradleRIO_CompilationDatabase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gradleRIO_CompilationDatabase

DEPRECATING! This pull request takes away the need for this script!

This will generate a compile_commands.json file based on a gradleRIO project.

Why not just ./gradlew generateCompileCommands?

For some reason, the clangd plugin for vscode and various autocomplete plugins for vim don't seem to like the compile_commands.json file that gradlew creates. They do, however, provide wonderful autocomplete with the file generated by my script for some reason.

Usage

$ chmod +x ./rioCDGen.py # do this once
$ ./rioCDGen.py --help

usage: rioCDGen.py [-h] [--compiler COMPILER] [--build-type {Debug,Release}] [--year YEAR] [--source SOURCE] [--pretty]

Generate a compile_commands.json for an frc gradle project

optional arguments:
  -h, --help            show this help message and exit
  --compiler COMPILER   path to the cross-compiler that gradleRIO uses. If not specified, the script will search for it
  --build-type {Debug,Release}, -bt {Debug,Release}
                        The type of build. Can be Debug or Release. Defaults to Debug
  --year YEAR, -y YEAR  The year of the toolchain/project. Defaults to the current year
  --source SOURCE, -S SOURCE, -s SOURCE
                        The root directory of the project(should be the directory with your build.gradle file. Defaults to cwd
  --pretty              pretty prints the ouput

note: run this in the project directory or use the -S option

Requirements

  • python3

Platforms

  • Linux
  • MaxOS
  • Windows

TODO:

  • more customizability implemented in f05923c
  • make it a pip package?
  • make it cross platform

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages