@versu/plugin-gradle 0.6.6 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,252 @@
1
+ # @versu/plugin-gradle - Gradle Adapter Plugin
2
+
3
+ Gradle adapter plugin for VERSU. Provides first-class support for versioning Gradle projects (Groovy & Kotlin DSL) in monorepo environments with automatic dependency detection and cascading version updates.
4
+
5
+ ## Installation
6
+
7
+ ### With Core Library
8
+
9
+ ```bash
10
+ npm install @versu/core @versu/plugin-gradle
11
+ ```
12
+
13
+ ### With CLI
14
+
15
+ ```bash
16
+ npm install -g @versu/cli @versu/plugin-gradle
17
+ ```
18
+
19
+ ### With GitHub Action
20
+
21
+ The plugin is automatically included with the GitHub Action. No separate installation needed.
22
+
23
+ ## Features
24
+
25
+ <!-- markdownlint-disable MD033 -->
26
+ ✅ **Multi-Module Support** - Automatic detection of Gradle multi-module projects<br>
27
+ ✅ **Dual DSL Support** - Works with both Groovy and Kotlin DSL<br>
28
+ ✅ **Centralized Versioning** - All versions managed through root `gradle.properties`<br>
29
+ ✅ **Dependency Detection** - Automatic project dependency analysis<br>
30
+ ✅ **SNAPSHOT Support** - Optional `-SNAPSHOT` suffix for development builds<br>
31
+ ✅ **Auto-Detection** - Automatically detected when Gradle files are present
32
+ <!-- markdownlint-enable MD033 -->
33
+
34
+ ## Usage
35
+
36
+ ### With @versu/core
37
+
38
+ ```typescript
39
+ import { VersuRunner } from '@versu/core';
40
+ import gradlePlugin from '@versu/plugin-gradle';
41
+
42
+ const runner = new VersuRunner({
43
+ repoRoot: '/path/to/repository',
44
+ plugins: [gradlePlugin],
45
+ adapter: 'gradle', // Optional - auto-detected
46
+ });
47
+
48
+ const result = await runner.run();
49
+ ```
50
+
51
+ ### With @versu/cli
52
+
53
+ The plugin is automatically loaded when installed globally:
54
+
55
+ ```bash
56
+ npm install -g @versu/plugin-gradle
57
+ versu --adapter gradle
58
+ ```
59
+
60
+ ### With @versu/action
61
+
62
+ ```yaml
63
+ - name: Install Gradle plugin
64
+ run: npm install -g @versu/plugin-gradle
65
+
66
+ - name: Version modules
67
+ uses: tvcsantos/versu@v0
68
+ with:
69
+ adapter: gradle
70
+ ```
71
+
72
+ ## Project Structure
73
+
74
+ The Gradle adapter expects a specific project structure:
75
+
76
+ ### Required Files
77
+
78
+ - `settings.gradle` or `settings.gradle.kts` - Defines multi-module structure
79
+ - `gradle.properties` (root) - Contains all module versions
80
+
81
+ ### Version Management
82
+
83
+ All module versions must be declared in the **root** `gradle.properties` file:
84
+
85
+ ```properties
86
+ # Root module version
87
+ version=1.0.0
88
+
89
+ # Submodule versions
90
+ core.version=2.1.0
91
+ api.version=1.5.0
92
+ utils.version=3.0.0
93
+ ```
94
+
95
+ ### Version Property Naming
96
+
97
+ - **Root module**: Use `version` property
98
+ - **Submodules**: Use `{moduleName}.version` pattern
99
+ - Module name is derived from `settings.gradle(.kts)` configuration
100
+ - For module `:core`, use property `core.version`
101
+ - For module `:lib:utils`, use property `lib-utils.version` (`:` replaced with `-`)
102
+
103
+ ### Example Project
104
+
105
+ ```text
106
+ myproject/
107
+ ├── settings.gradle.kts
108
+ ├── build.gradle.kts
109
+ ├── gradle.properties # All versions here
110
+ ├── core/
111
+ │ └── build.gradle.kts
112
+ ├── api/
113
+ │ └── build.gradle.kts
114
+ └── lib/
115
+ └── utils/
116
+ └── build.gradle.kts
117
+ ```
118
+
119
+ **settings.gradle.kts:**
120
+
121
+ ```kotlin
122
+ rootProject.name = "myproject"
123
+
124
+ include(":core")
125
+ include(":api")
126
+ include(":lib:utils")
127
+ ```
128
+
129
+ **gradle.properties:**
130
+
131
+ ```properties
132
+ version=1.0.0
133
+ core.version=2.1.0
134
+ api.version=1.5.0
135
+ lib-utils.version=3.0.0
136
+ ```
137
+
138
+ ## Dependency Detection
139
+
140
+ The plugin automatically detects project dependencies using a custom Gradle init script. Dependencies are analyzed to determine version cascading when modules are updated.
141
+
142
+ ### Supported Dependency Types
143
+
144
+ - `implementation`
145
+ - `api`
146
+ - `compileOnly`
147
+ - `runtimeOnly`
148
+ - And other standard Gradle dependency configurations
149
+
150
+ ### Example
151
+
152
+ If `api` depends on `core`, and `core` gets a version bump, VERSU will automatically cascade the change to `api` based on your dependency rules configuration.
153
+
154
+ ## Configuration
155
+
156
+ The Gradle plugin respects all VERSU configuration options. See the [core package documentation](../core#configuration) for details.
157
+
158
+ ### Gradle-Specific Options
159
+
160
+ When using the `appendSnapshot` option, the plugin adds `-SNAPSHOT` suffix to all versions:
161
+
162
+ ```typescript
163
+ const runner = new VersuRunner({
164
+ repoRoot: '/path/to/repository',
165
+ adapter: 'gradle',
166
+ appendSnapshot: true, // Generates versions like 1.2.3-SNAPSHOT
167
+ });
168
+ ```
169
+
170
+ ## Auto-Detection
171
+
172
+ The plugin automatically activates when any of these files are present in the repository root:
173
+
174
+ - `build.gradle`
175
+ - `build.gradle.kts`
176
+ - `settings.gradle`
177
+ - `settings.gradle.kts`
178
+
179
+ ## Plugin Architecture
180
+
181
+ The plugin implements the VERSU plugin contract:
182
+
183
+ ```typescript
184
+ interface PluginContract {
185
+ id: string;
186
+ name: string;
187
+ description: string;
188
+ version: string;
189
+ author: string | string[];
190
+ adapters: AdapterPluginContract[];
191
+ }
192
+ ```
193
+
194
+ ### Components
195
+
196
+ 1. **GradleAdapterIdentifier** - Detects Gradle projects
197
+ 2. **GradleModuleDetector** - Discovers modules and dependencies
198
+ 3. **GradleVersionUpdateStrategy** - Updates versions in `gradle.properties`
199
+ 4. **GradleModuleSystemFactory** - Orchestrates the components
200
+
201
+ ## Limitations
202
+
203
+ - **Version Source**: Only `gradle.properties` is supported for version management
204
+ - **Module Location**: All modules must be declared in `settings.gradle(.kts)`
205
+ - **Version Format**: Versions must follow semantic versioning (e.g., `1.2.3`)
206
+
207
+ ## Development
208
+
209
+ ### Building
210
+
211
+ ```bash
212
+ # From monorepo root
213
+ npm run build
214
+
215
+ # Or from plugin package
216
+ cd packages/plugin-gradle
217
+ npm run build
218
+ ```
219
+
220
+ ### Testing
221
+
222
+ ```bash
223
+ # From monorepo root
224
+ npm test
225
+
226
+ # Or from plugin package
227
+ cd packages/plugin-gradle
228
+ npm test
229
+ npm run test:coverage
230
+ ```
231
+
232
+ ### Publishing
233
+
234
+ ```bash
235
+ npm publish --workspace packages/plugin-gradle --access public
236
+ ```
237
+
238
+ ## Related Packages
239
+
240
+ - **[@versu/core](../core)** - Core library for programmatic usage
241
+ - **[@versu/cli](../cli)** - Command-line interface
242
+ - **[@versu/action](../action)** - GitHub Actions integration
243
+
244
+ ## Requirements
245
+
246
+ - **Node.js**: >= 20
247
+ - **Gradle**: >= 6.0 (tested with Gradle 6.x - 8.x)
248
+ - **Java**: Required for running Gradle
249
+
250
+ ## License
251
+
252
+ MIT License - see [LICENSE](../../LICENSE) for details.
package/dist/constants.js CHANGED
@@ -10,3 +10,4 @@ export const GRADLE_SETTINGS_FILE = "settings.gradle";
10
10
  export const GRADLE_SETTINGS_KTS_FILE = "settings.gradle.kts";
11
11
  /** Unique identifier for the Gradle adapter ('gradle'). */
12
12
  export const GRADLE_ID = "gradle";
13
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAE1D,mFAAmF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAEhD,uFAAuF;AACvF,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAExD,uFAAuF;AACvF,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAEtD,2FAA2F;AAC3F,MAAM,CAAC,MAAM,wBAAwB,GAAG,qBAAqB,CAAC;AAE9D,2DAA2D;AAC3D,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"gradle-project-information.d.ts","sourceRoot":"","sources":["../src/gradle-project-information.ts"],"names":[],"mappings":"AAMA,OAAO,EAQL,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAwHrB;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,qBAAqB,CAAC,CAoFhC;AA2CD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,kBAAkB,EAAE,qBAAqB,GACxC,kBAAkB,CA8CpB"}
1
+ {"version":3,"file":"gradle-project-information.d.ts","sourceRoot":"","sources":["../src/gradle-project-information.ts"],"names":[],"mappings":"AAMA,OAAO,EAQL,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AA0HrB;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,qBAAqB,CAAC,CAmFhC;AA2CD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,kBAAkB,EAAE,qBAAqB,GACxC,kBAAkB,CA8CpB"}
@@ -60,7 +60,9 @@ async function computeGradleFilesHash(projectRoot) {
60
60
  * @throws {Error} If initialization script not found or Gradle execution fails
61
61
  */
62
62
  async function executeGradleScript(projectRoot, outputFile) {
63
- logger.info(`⚙️ Executing Gradle to collect project information...`);
63
+ logger.info("Executing Gradle to collect project information", {
64
+ projectRoot,
65
+ });
64
66
  const gradlew = join(projectRoot, GRADLE_WRAPPER);
65
67
  const dirname = path.dirname(fileURLToPath(import.meta.url));
66
68
  const initScriptPath = join(dirname, GRADLE_INIT_SCRIPT);
@@ -88,7 +90,7 @@ async function executeGradleScript(projectRoot, outputFile) {
88
90
  if (result.exitCode !== 0) {
89
91
  throw new Error(`Gradle command failed with exit code ${result.exitCode}: ${result.stderr}`);
90
92
  }
91
- logger.info(`✅ Gradle project information generated at ${outputFile}.`);
93
+ logger.info("Gradle project information generated", { outputFile });
92
94
  }
93
95
  /**
94
96
  * Executes Gradle to collect raw project structure information.
@@ -105,29 +107,32 @@ export async function getRawProjectInformation(projectRoot, outputFile) {
105
107
  let executeScript = true;
106
108
  // Compute hash of all Gradle build files
107
109
  const currentHash = await computeGradleFilesHash(projectRoot);
108
- logger.debug(`🔍 Computed Gradle files hash: ${currentHash}`);
110
+ logger.debug("Computed Gradle files hash", { hash: currentHash });
109
111
  if (fileExists) {
110
- logger.info(`💾 Cached project information found at ${outputFile}. Validating cache...`);
112
+ logger.info("Cached project information found", { cacheFile: outputFile });
111
113
  // Step 2: File exists, check cache validity
112
114
  try {
113
115
  const fileContent = await fs.readFile(outputFile, "utf-8");
114
116
  const cachedData = JSON.parse(fileContent);
115
117
  // Step 2.1: Compare hashes
116
118
  if (cachedData.hash === currentHash) {
117
- logger.info(`✅ Cache is valid. Using cached project information.`);
119
+ logger.info("Cache validated, using cached project information");
118
120
  // Cache hit - use cached data
119
121
  executeScript = false;
120
122
  data = cachedData.data;
121
123
  }
122
124
  else {
123
- logger.debug(`❌ Cache is invalid. Cached hash: ${cachedData.hash}`);
124
- logger.info(`🔄 Gradle files changed, regenerating project information...`);
125
+ logger.debug("Cache is invalid", {
126
+ cachedHash: cachedData.hash,
127
+ currentHash,
128
+ });
129
+ logger.info("Gradle files changed, regenerating project information");
125
130
  }
126
131
  // Cache miss - hash mismatch, need to regenerate
127
132
  }
128
133
  catch (error) {
129
134
  // If there's any error reading/parsing cached file, regenerate
130
- logger.warning(`⚠️ Failed to read cached project information: ${error}`);
135
+ logger.warning("Failed to read cached project information", { error });
131
136
  }
132
137
  }
133
138
  if (executeScript) {
@@ -230,3 +235,4 @@ export function getProjectInformation(projectInformation) {
230
235
  rootModule,
231
236
  };
232
237
  }
238
+ //# sourceMappingURL=gradle-project-information.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gradle-project-information.js","sourceRoot":"","sources":["../src/gradle-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1C,2DAA2D;IAC3D,IAAI,UAA8B,CAAC;IACnC,KAAK,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACvE,IAAI,SAAS,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YAC9B,UAAU,GAAG,QAAQ,CAAC;QACxB,CAAC;QAED,kCAAkC;QAClC,MAAM,MAAM,GAAW;YACrB,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,eAAe,EAAE,IAAI,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC;YACnD,6DAA6D;YAC7D,OAAO,EACL,SAAS,CAAC,OAAO,KAAK,SAAS;gBAC7B,CAAC,CAAC,oBAAoB,EAAE;gBACxB,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC;YACpC,eAAe,EAAE,SAAS,CAAC,eAAe;SAC3C,CAAC;QAEF,IAAI,iBAAiB,IAAI,SAAS,EAAE,CAAC;YACnC,MAAM,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAC,eAAe,CAAC;QACxD,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,wCAAwC;IACxC,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CACb,qCAAqC;YACnC,2EAA2E,CAC9E,CAAC;IACJ,CAAC;IAED,OAAO;QACL,SAAS;QACT,OAAO;QACP,UAAU;KACX,CAAC;AACJ,CAAC"}
package/dist/index.js CHANGED
@@ -16,3 +16,4 @@ const gradlePlugin = {
16
16
  ],
17
17
  };
18
18
  export default gradlePlugin;
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,YAAY,GAAmB;IACnC,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,kHAAkH;IACpH,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,OAAO;IACf,QAAQ,EAAE;QACR;YACE,EAAE,EAAE,QAAQ;YACZ,iBAAiB,EAAE,GAAG,EAAE,CAAC,IAAI,uBAAuB,EAAE;YACtD,mBAAmB,EAAE,CAAC,QAAgB,EAAE,EAAE,CACxC,IAAI,yBAAyB,CAAC,QAAQ,CAAC;SAC1C;KACF;CACF,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -31,7 +31,7 @@ export class GradleAdapterIdentifier {
31
31
  const projectRootExists = await exists(projectRoot);
32
32
  if (!projectRootExists) {
33
33
  // Log for debugging and return false immediately
34
- logger.debug(`Project root does not exist: ${projectRoot}`);
34
+ logger.debug("Project root does not exist", { projectRoot });
35
35
  return false;
36
36
  }
37
37
  // Read directory contents (only top-level files)
@@ -41,3 +41,4 @@ export class GradleAdapterIdentifier {
41
41
  return hasGradleFile;
42
42
  }
43
43
  }
44
+ //# sourceMappingURL=gradle-adapter-identifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gradle-adapter-identifier.js","sourceRoot":"","sources":["../../src/services/gradle-adapter-identifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAqB,MAAM,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEhE,yDAAyD;AACzD,MAAM,YAAY,GAAG;IACnB,sBAAsB;IACtB,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB;IACpB,wBAAwB;CACzB,CAAC;AAEF;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAClC,kFAAkF;IACzE,QAAQ,GAAG;QAClB,EAAE,EAAE,SAAS;QACb,YAAY,EAAE;YACZ,iBAAiB,EAAE,IAAI;SACxB;KACF,CAAC;IAEF;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,yCAAyC;QACzC,MAAM,iBAAiB,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC;QAEpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,iDAAiD;YACjD,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;YAC7D,OAAO,KAAK,CAAC;QACf,CAAC;QAED,iDAAiD;QACjD,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAE5C,6DAA6D;QAC7D,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QAExE,OAAO,aAAa,CAAC;IACvB,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- import { ModuleDetector, ModuleRegistry } from "@versu/core";
1
+ import { ModuleDetector, type ProjectInformation } from "@versu/core";
2
2
  /**
3
3
  * Module detector for Gradle-based projects.
4
4
  * Executes Gradle to discover all modules and their dependencies, returning a ModuleRegistry.
@@ -13,6 +13,6 @@ export declare class GradleModuleDetector implements ModuleDetector {
13
13
  * @returns ModuleRegistry containing all discovered modules and their relationships
14
14
  * @throws {Error} If Gradle execution fails or project information cannot be parsed
15
15
  */
16
- detect(): Promise<ModuleRegistry>;
16
+ detect(): Promise<ProjectInformation>;
17
17
  }
18
18
  //# sourceMappingURL=gradle-module-detector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gradle-module-detector.d.ts","sourceRoot":"","sources":["../../src/services/gradle-module-detector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAM7D;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,cAAc;IAGvD,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM;IAH7B,sDAAsD;gBAE3C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM;IAG7B;;;;OAIG;IACG,MAAM,IAAI,OAAO,CAAC,cAAc,CAAC;CAaxC"}
1
+ {"version":3,"file":"gradle-module-detector.d.ts","sourceRoot":"","sources":["../../src/services/gradle-module-detector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAMtE;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,cAAc;IAGvD,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM;IAH7B,sDAAsD;gBAE3C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM;IAG7B;;;;OAIG;IACG,MAAM,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAa5C"}
@@ -1,4 +1,3 @@
1
- import { ModuleRegistry } from "@versu/core";
2
1
  import { getRawProjectInformation, getProjectInformation, } from "../gradle-project-information.js";
3
2
  /**
4
3
  * Module detector for Gradle-based projects.
@@ -23,6 +22,7 @@ export class GradleModuleDetector {
23
22
  // Step 2: Parse and transform raw data into structured module information
24
23
  const projectInformation = getProjectInformation(rawProjectInformation);
25
24
  // Step 3: Create a registry for efficient module access and querying
26
- return new ModuleRegistry(projectInformation);
25
+ return projectInformation;
27
26
  }
28
27
  }
28
+ //# sourceMappingURL=gradle-module-detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gradle-module-detector.js","sourceRoot":"","sources":["../../src/services/gradle-module-detector.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,kCAAkC,CAAC;AAE1C;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAGpB;IACA;IAHX,sDAAsD;IACtD,YACW,QAAgB,EAChB,UAAkB;QADlB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,eAAU,GAAV,UAAU,CAAQ;IAC1B,CAAC;IAEJ;;;;OAIG;IACH,KAAK,CAAC,MAAM;QACV,gEAAgE;QAChE,MAAM,qBAAqB,GAAG,MAAM,wBAAwB,CAC1D,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,UAAU,CAChB,CAAC;QAEF,0EAA0E;QAC1E,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,qBAAqB,CAAC,CAAC;QAExE,qEAAqE;QACrE,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF"}
@@ -27,3 +27,4 @@ export class GradleModuleSystemFactory {
27
27
  return new GradleVersionUpdateStrategy(this.repoRoot, moduleRegistry);
28
28
  }
29
29
  }
30
+ //# sourceMappingURL=gradle-module-system-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gradle-module-system-factory.js","sourceRoot":"","sources":["../../src/services/gradle-module-system-factory.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAElF;;;GAGG;AACH,MAAM,OAAO,yBAAyB;IAEP;IAD7B,sDAAsD;IACtD,YAA6B,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;IAEjD;;;;OAIG;IACH,cAAc,CAAC,UAAkB;QAC/B,OAAO,IAAI,oBAAoB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC7D,CAAC;IAED;;;;OAIG;IACH,2BAA2B,CACzB,cAA8B;QAE9B,OAAO,IAAI,2BAA2B,CAAC,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IACxE,CAAC;CACF"}
@@ -36,3 +36,4 @@ export class GradleVersionUpdateStrategy {
36
36
  await upsertProperties(this.versionFilePath, propertyUpdates);
37
37
  }
38
38
  }
39
+ //# sourceMappingURL=gradle-version-update-strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gradle-version-update-strategy.js","sourceRoot":"","sources":["../../src/services/gradle-version-update-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAEL,gBAAgB,GAEjB,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IAUnB;IATnB,mDAAmD;IAClC,eAAe,CAAS;IAEzC;;;OAGG;IACH,YACE,QAAgB,EACC,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QAE/C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;IAChE,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,mBAAmB,CACvB,cAAmC;QAEnC,uCAAuC;QACvC,mDAAmD;QACnD,MAAM,eAAe,GAAG,IAAI,GAAG,EAAkB,CAAC;QAElD,KAAK,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC,IAAI,cAAc,EAAE,CAAC;YACvD,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YACvD,MAAM,YAAY,GAAG,MAAM,CAAC,iBAAiB,CAAW,CAAC;YACzD,eAAe,CAAC,GAAG,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QACnD,CAAC;QAED,yEAAyE;QACzE,wDAAwD;QACxD,MAAM,gBAAgB,CAAC,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAChE,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "0.6.6";
1
+ export declare const VERSION = "0.6.8";
2
2
  export declare const PACKAGE_NAME = "@versu/plugin-gradle";
3
3
  export declare const AUTHORS = "tvcsantos";
4
4
  //# sourceMappingURL=version.d.ts.map
@@ -1,5 +1,6 @@
1
1
  // This file is auto-generated. Do not edit manually.
2
2
  // Run 'npm run generate-version' to update this file.
3
- export const VERSION = "0.6.6";
3
+ export const VERSION = "0.6.8";
4
4
  export const PACKAGE_NAME = "@versu/plugin-gradle";
5
5
  export const AUTHORS = "tvcsantos";
6
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,sDAAsD;AACtD,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAC/B,MAAM,CAAC,MAAM,YAAY,GAAG,sBAAsB,CAAC;AACnD,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versu/plugin-gradle",
3
- "version": "0.6.6",
3
+ "version": "0.6.8",
4
4
  "description": "VERSU Gradle Plugin",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -50,10 +50,10 @@
50
50
  "fast-glob": "^3.3.3"
51
51
  },
52
52
  "peerDependencies": {
53
- "@versu/core": "^0.6.6"
53
+ "@versu/core": "^0.6.8"
54
54
  },
55
55
  "devDependencies": {
56
- "@versu/core": "^0.6.6",
56
+ "@versu/core": "^0.6.8",
57
57
  "@types/node": "^20.19.23",
58
58
  "@types/semver": "^7.7.1",
59
59
  "@typescript-eslint/eslint-plugin": "^6.15.0",