How to add new dependencies?
See original GitHub issueContext: buildSrcVersions is a Gradle plugin that makes it easier to manage your dependencies inside your IDE. It extracts all your dependencies and search for available dependencies updates.
The description shows how to bootstrap the switch and how to update to new dependencies. However, I can’t see how to add a new dependency. Looks to me that Libs.kt
is not meant to be manually edited. So is the idea to add an “old-fashioned” dependency, and then run syncLibs to create a new Libs.kt
, and then replace the dependency literal? That feels convoluted. Is there a better way? Perhaps a registerDependency
task that takes a dependency string and adds it to Libs.kt
and Versions.kt
?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Adding dependencies to a package.json file - npm Docs
To add dependencies and devDependencies to a package.json file from the command line, you can install them in the root directory of your...
Read more >Add New Dependencies - WebStorm Guide - JetBrains
To quickly add a new dependency to your project, add an import statement first, then hit Alt+Enter, and click Install and add to ......
Read more >Add build dependencies - Android Developers
Learn how to add build dependencies using the Gradle build system in Android Studio. ... Creates a new MyArgsProvider object, specifies the input...
Read more >Installing dependencies | Yarn
yarn install is used to install all dependencies for a project. The dependencies are retrieved from your project's package.json file, and stored in...
Read more >Add a dependency in Maven - Stack Overflow
Open pom.xml in STS editor, click "Dependencies" tab at bottom 2. Click "Add" in Dependencies group 3. Copy/paste "Maven" tab ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nkiesel
That’s correct.
I would suggest to use the IDE plugin OK, Gradle! from @scana that solves the adding dependency problem brillantly.
Currently, you would still have to run
./gradlew syncTasks
and replace the strings withLibs.whatever
after. Ideally, I would like to integrate the IDE plugin with my gradle plugin.Related: https://github.com/scana/ok-gradle/issues/14
@nkiesel there are finally news on this topic. You can do
$ ./gradlew :buildSrcVersions --update
or$ ./gradlew refreshVersions --update
. It will upgrade to the newer versions and you can fix what you don’t want by looking at the git diff. This will makes it permanenthttps://github.com/jmfayard/buildSrcVersions/issues/53