question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[PROPOSAL] Incorporate a generic build system (something like Gradle).

See original GitHub issue

Is your feature request related to a problem? Please describe.

Coming from https://github.com/opensearch-project/opensearch-build/issues/1375. Adding gradle to the project will help ease the automation part by working with simple gradle tasks, gradle also supports a bunch of node plugins that run node specific tasks, example https://plugins.gradle.org/plugin/com.github.node-gradle.node. Using gradle it’s also easy to incorporate any future automation tasks. One being auto increment the development iteration solution. Having gradle as build systems the automation will be consistent for OpenSearch core and OpenSearch Dashboards as well.

Describe the solution you’d like To start with gradle build system, implement the solution to increment the development iteration upon every release. Right now since OpenSearch-Dashboards do not have gradle, there is some limitation to perform the automation that will launch a workflow which will trigger gradle tasks to auto-increment the version.

Describe alternatives you’ve considered

For node, using npm or yarn or any other packages could fullfil the the version increment, but this is only limited to JSON file and some with only strict semantic version. Looking at this example PR, its beyond just a JSON file and more that just having a version in the JSON file, the version increment is required in multiple files. The other alternate solutions particularly for version increment problem is to create a workflow with linux parsing tools like awk, sed, but this so brittle and requires developer effort to modify the logic when ever the file changes.

Additional context

Considering for current and future automations, gradle would help ease to implement them with custom tasks and plugins, once gradle build system is part of OpenSearch-Dashboards, its associated plugins can implement the gradle build system.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:20 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
AMoo-Mikicommented, Sep 21, 2022
  • I have introduced a version command to the plugin-helpers in #2398; this can be used to update plugins before building them.
  • For OSD version updates, please use the commands in my previous comment.
0reactions
AMoo-Mikicommented, Sep 20, 2022

As far as Dashboards is concerned, this should be just bumping the version in package.json. If we find that there are places with hardcoded version numbers, we should change them to pull in the version from the package.json file.

  • To set the version to something specific: yarn version --new-version <version>
  • To bump the major version and reset minor and patch to zeros: yarn version --major
  • To bump the minor version and reset patch to zero: yarn version --minor
  • To bump the patch version: yarn version --patch

Ref: https://classic.yarnpkg.com/lang/en/docs/cli/version/

Plugins will be very different since they don’t follow semantic versioning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Composing builds - Gradle User Manual
In many ways a composite build is similar to a Gradle multi-project build, except that instead of including single projects , complete builds...
Read more >
The Gradle build system- Tutorial - Vogella.com
Gradle is a general purpose build management system. Gradle supports the automatic download and configuration of dependencies or other libraries ...
Read more >
Getting Started | Building Java Projects with Gradle - Spring
This guide walks you through using Gradle to build a simple Java project. ... Like most Spring Getting Started guides, you can start...
Read more >
Configure build variants | Android Developers
Build variants are the result of Gradle using a specific set of rules to combine settings, code, and resources configured in your build...
Read more >
Introducing {py}gradle, an open source Python plugin for Gradle
This example configures the Gradle build system to build a source distribution for Flask. Some concepts, like dependency declaration, are common ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found