ai-flow-dev 2.5.3 → 2.6.0
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 +16 -13
- package/dist/cli.js +30 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/prompts/backend/flow-build-phase-0.md +115 -5
- package/prompts/backend/flow-build-phase-3.md +52 -0
- package/prompts/desktop/flow-build-phase-0.md +359 -0
- package/prompts/desktop/flow-build-phase-1.md +295 -0
- package/prompts/desktop/flow-build-phase-10.md +357 -0
- package/prompts/desktop/flow-build-phase-2.md +282 -0
- package/prompts/desktop/flow-build-phase-3.md +291 -0
- package/prompts/desktop/flow-build-phase-4.md +308 -0
- package/prompts/desktop/flow-build-phase-5.md +269 -0
- package/prompts/desktop/flow-build-phase-6.md +350 -0
- package/prompts/desktop/flow-build-phase-7.md +297 -0
- package/prompts/desktop/flow-build-phase-8.md +541 -0
- package/prompts/desktop/flow-build-phase-9.md +439 -0
- package/prompts/desktop/flow-build.md +156 -0
- package/prompts/desktop/flow-check-review.md +20 -0
- package/prompts/desktop/flow-check-test.md +14 -0
- package/prompts/desktop/flow-check.md +67 -0
- package/prompts/desktop/flow-commit.md +119 -0
- package/prompts/desktop/flow-docs-sync.md +354 -0
- package/prompts/desktop/flow-work-feature.md +61 -0
- package/prompts/desktop/flow-work-fix.md +46 -0
- package/prompts/desktop/flow-work-refactor.md +48 -0
- package/prompts/desktop/flow-work-resume.md +34 -0
- package/prompts/desktop/flow-work.md +1023 -0
- package/templates/AGENT.template.md +1 -1
- package/templates/desktop/.clauderules.template +112 -0
- package/templates/desktop/.cursorrules.template +102 -0
- package/templates/desktop/README.template.md +170 -0
- package/templates/desktop/ai-instructions.template.md +366 -0
- package/templates/desktop/copilot-instructions.template.md +140 -0
- package/templates/desktop/docs/docs/api.template.md +320 -0
- package/templates/desktop/docs/docs/architecture.template.md +724 -0
- package/templates/desktop/docs/docs/business-flows.template.md +102 -0
- package/templates/desktop/docs/docs/code-standards.template.md +792 -0
- package/templates/desktop/docs/docs/contributing.template.md +149 -0
- package/templates/desktop/docs/docs/data-model.template.md +520 -0
- package/templates/desktop/docs/docs/operations.template.md +720 -0
- package/templates/desktop/docs/docs/testing.template.md +722 -0
- package/templates/desktop/project-brief.template.md +150 -0
- package/templates/desktop/specs/specs/configuration.template.md +121 -0
- package/templates/desktop/specs/specs/security.template.md +392 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
## PHASE 6: Testing (10-15 min)
|
|
2
|
+
|
|
3
|
+
> **Order for this phase:** 6.1 → 6.2 → 6.3 → 6.4 → 6.5
|
|
4
|
+
|
|
5
|
+
### Objective
|
|
6
|
+
|
|
7
|
+
Define the testing strategy for desktop applications, including unit, integration, and UI tests.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 6.1 Testing Levels
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Which testing levels will you implement?
|
|
15
|
+
|
|
16
|
+
A) 🧪 Unit Tests - Test individual methods/classes
|
|
17
|
+
- Framework: JUnit 5 (recommended) or TestNG
|
|
18
|
+
- Mocking: Mockito, EasyMock
|
|
19
|
+
- Coverage goal: 70%+
|
|
20
|
+
- Fast, isolated, repeatable
|
|
21
|
+
|
|
22
|
+
B) 🔗 Integration Tests - Test component interactions
|
|
23
|
+
- Database tests (H2 in-memory)
|
|
24
|
+
- File I/O tests
|
|
25
|
+
- Service integration tests
|
|
26
|
+
- Coverage goal: 50%+
|
|
27
|
+
|
|
28
|
+
C) 🖥️ UI Tests - Test user interface
|
|
29
|
+
- Swing: AssertJ-Swing, Fest-Swing
|
|
30
|
+
- JavaFX: TestFX
|
|
31
|
+
- SWT: SWTBot
|
|
32
|
+
- Coverage goal: 30%+ (critical flows)
|
|
33
|
+
|
|
34
|
+
D) 🏁 End-to-End Tests - Full application flow
|
|
35
|
+
- User scenarios
|
|
36
|
+
- Test from UI to database
|
|
37
|
+
- Manual or automated
|
|
38
|
+
|
|
39
|
+
E) 🚀 Performance Tests - Measure performance
|
|
40
|
+
- Startup time
|
|
41
|
+
- Memory usage
|
|
42
|
+
- Response time
|
|
43
|
+
- JMH benchmarks
|
|
44
|
+
|
|
45
|
+
Your testing levels: __
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 6.2 Unit Testing Strategy
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Unit testing approach:
|
|
54
|
+
|
|
55
|
+
**Test Framework:**
|
|
56
|
+
A) ⭐ JUnit 5 (Jupiter) - Modern, recommended
|
|
57
|
+
- @Test, @BeforeEach, @AfterEach
|
|
58
|
+
- Assertions, assumptions
|
|
59
|
+
- Parameterized tests
|
|
60
|
+
|
|
61
|
+
B) TestNG - Alternative framework
|
|
62
|
+
- More features, more complex
|
|
63
|
+
- Popular in enterprise
|
|
64
|
+
|
|
65
|
+
Your choice: __
|
|
66
|
+
|
|
67
|
+
**Mocking Framework:**
|
|
68
|
+
A) ⭐ Mockito - Most popular
|
|
69
|
+
- Mock objects, verify interactions
|
|
70
|
+
- @Mock, @InjectMocks annotations
|
|
71
|
+
|
|
72
|
+
B) EasyMock - Alternative
|
|
73
|
+
C) PowerMock - For static methods (use sparingly)
|
|
74
|
+
D) No mocking - Real objects only
|
|
75
|
+
|
|
76
|
+
Your choice: __
|
|
77
|
+
|
|
78
|
+
**Assertion Library:**
|
|
79
|
+
A) JUnit Assertions - Built-in
|
|
80
|
+
B) ⭐ AssertJ - Fluent assertions (recommended)
|
|
81
|
+
- assertThat(user.getName()).isEqualTo("John")
|
|
82
|
+
C) Hamcrest - Matcher-based assertions
|
|
83
|
+
|
|
84
|
+
Your choice: __
|
|
85
|
+
|
|
86
|
+
**Test Organization:**
|
|
87
|
+
- Test class naming: [ClassName]Test or Test[ClassName]?
|
|
88
|
+
A) UserServiceTest (suffix)
|
|
89
|
+
B) TestUserService (prefix)
|
|
90
|
+
|
|
91
|
+
- Test package: Same as source or separate?
|
|
92
|
+
A) Same package as source (src/test/java/com/company/app/service/)
|
|
93
|
+
B) Separate test package (src/test/java/test/service/)
|
|
94
|
+
|
|
95
|
+
Your choices: __
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 6.3 UI Testing Strategy
|
|
101
|
+
|
|
102
|
+
**For Swing:**
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
UI testing for Swing applications:
|
|
106
|
+
|
|
107
|
+
**Framework:**
|
|
108
|
+
A) ⭐ AssertJ-Swing - Fluent API (recommended)
|
|
109
|
+
- FrameFixture, DialogFixture
|
|
110
|
+
- Component lookups
|
|
111
|
+
- User interaction simulation
|
|
112
|
+
|
|
113
|
+
B) Fest-Swing - Legacy (predecessor of AssertJ-Swing)
|
|
114
|
+
C) Jemmy - NetBeans testing library
|
|
115
|
+
D) Manual testing only
|
|
116
|
+
|
|
117
|
+
Your choice: __
|
|
118
|
+
|
|
119
|
+
**Test Approach:**
|
|
120
|
+
A) Headless testing - Run without display (CI/CD)
|
|
121
|
+
- System.setProperty("java.awt.headless", "true")
|
|
122
|
+
B) Full UI testing - Real display required
|
|
123
|
+
C) Hybrid - Headless for CI, full for local
|
|
124
|
+
|
|
125
|
+
**Test Coverage:**
|
|
126
|
+
- Critical flows: Login, main operations
|
|
127
|
+
- Error scenarios: Invalid input, exceptions
|
|
128
|
+
- Edge cases: Empty data, boundaries
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**For JavaFX:**
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
UI testing for JavaFX applications:
|
|
135
|
+
|
|
136
|
+
**Framework:**
|
|
137
|
+
A) ⭐ TestFX - Official JavaFX testing (recommended)
|
|
138
|
+
- FxRobot for interactions
|
|
139
|
+
- Lookup API for components
|
|
140
|
+
- Headless mode support
|
|
141
|
+
|
|
142
|
+
Your choice: __
|
|
143
|
+
|
|
144
|
+
**Test Approach:**
|
|
145
|
+
A) Headless testing - Monocle headless platform
|
|
146
|
+
- System.setProperty("testfx.robot", "glass")
|
|
147
|
+
- System.setProperty("testfx.headless", "true")
|
|
148
|
+
B) Full UI testing - Real display
|
|
149
|
+
|
|
150
|
+
**Test Coverage:**
|
|
151
|
+
- Scene graph testing
|
|
152
|
+
- Property binding validation
|
|
153
|
+
- CSS styling tests
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**For SWT:**
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
UI testing for SWT applications:
|
|
160
|
+
|
|
161
|
+
**Framework:**
|
|
162
|
+
A) ⭐ SWTBot - Eclipse SWT testing (recommended)
|
|
163
|
+
- Widget finders
|
|
164
|
+
- User action simulation
|
|
165
|
+
- Eclipse integration
|
|
166
|
+
|
|
167
|
+
Your choice: __
|
|
168
|
+
|
|
169
|
+
**Test Approach:**
|
|
170
|
+
- Eclipse workbench testing
|
|
171
|
+
- Plugin testing
|
|
172
|
+
- RCP application testing
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 6.4 Test Data & Fixtures
|
|
178
|
+
|
|
179
|
+
````
|
|
180
|
+
How will you manage test data?
|
|
181
|
+
|
|
182
|
+
**Test Database:**
|
|
183
|
+
A) ⭐ H2 in-memory - Fast, isolated (recommended)
|
|
184
|
+
- jdbc:h2:mem:testdb
|
|
185
|
+
- Reset between tests
|
|
186
|
+
|
|
187
|
+
B) Test database instance - Separate test DB
|
|
188
|
+
C) Docker containers - Testcontainers
|
|
189
|
+
D) No database - Mock DAO layer
|
|
190
|
+
|
|
191
|
+
Your choice: __
|
|
192
|
+
|
|
193
|
+
**Test Data:**
|
|
194
|
+
A) ✅ In-code test data - Small datasets
|
|
195
|
+
```java
|
|
196
|
+
User user = new User("John", "john@example.com");
|
|
197
|
+
````
|
|
198
|
+
|
|
199
|
+
B) ✅ Test fixtures - Shared setup
|
|
200
|
+
|
|
201
|
+
```java
|
|
202
|
+
@BeforeEach
|
|
203
|
+
void setUp() {
|
|
204
|
+
testData = createTestData();
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
C) ✅ External files - JSON, CSV, SQL
|
|
209
|
+
|
|
210
|
+
- src/test/resources/test-data.json
|
|
211
|
+
|
|
212
|
+
D) ✅ Builders/Factories - Fluent test data creation
|
|
213
|
+
|
|
214
|
+
```java
|
|
215
|
+
User user = UserBuilder.aUser()
|
|
216
|
+
.withName("John")
|
|
217
|
+
.withEmail("john@example.com")
|
|
218
|
+
.build();
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Your choices: \_\_
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## 6.5 CI/CD Integration
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Will you run tests in CI/CD?
|
|
232
|
+
|
|
233
|
+
A) ✅ Yes - Automated testing on commit
|
|
234
|
+
|
|
235
|
+
- GitHub Actions
|
|
236
|
+
- GitLab CI
|
|
237
|
+
- Jenkins
|
|
238
|
+
- Travis CI
|
|
239
|
+
|
|
240
|
+
B) ❌ No - Manual testing only
|
|
241
|
+
|
|
242
|
+
If yes, specify:
|
|
243
|
+
|
|
244
|
+
**Build Tool:**
|
|
245
|
+
A) Maven - mvn test
|
|
246
|
+
B) Gradle - gradle test
|
|
247
|
+
C) Ant - ant test
|
|
248
|
+
|
|
249
|
+
**Test Reports:**
|
|
250
|
+
A) ✅ JUnit XML reports
|
|
251
|
+
B) ✅ HTML reports (Surefire, Gradle)
|
|
252
|
+
C) ✅ Code coverage reports (JaCoCo)
|
|
253
|
+
D) ✅ SonarQube integration
|
|
254
|
+
|
|
255
|
+
**Headless Mode:**
|
|
256
|
+
|
|
257
|
+
- Run UI tests headless in CI?
|
|
258
|
+
A) ✅ Yes - Xvfb (Linux), Headless mode
|
|
259
|
+
B) ❌ No - Skip UI tests in CI
|
|
260
|
+
|
|
261
|
+
**Fail on:**
|
|
262
|
+
A) ✅ Test failures
|
|
263
|
+
B) ✅ Coverage below threshold (e.g., 70%)
|
|
264
|
+
C) ✅ Static analysis violations
|
|
265
|
+
|
|
266
|
+
Your choices: \_\_
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
### Phase 6 Output
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
📋 PHASE 6 SUMMARY:
|
|
277
|
+
|
|
278
|
+
Testing Levels:
|
|
279
|
+
|
|
280
|
+
- Unit Tests: JUnit 5 + Mockito (70% coverage)
|
|
281
|
+
- Integration Tests: H2 in-memory DB (50% coverage)
|
|
282
|
+
- UI Tests: [AssertJ-Swing/TestFX/SWTBot] (30% coverage)
|
|
283
|
+
|
|
284
|
+
Test Framework: [JUnit 5]
|
|
285
|
+
Mocking: [Mockito]
|
|
286
|
+
Assertions: [AssertJ]
|
|
287
|
+
UI Testing: [AssertJ-Swing / TestFX / SWTBot]
|
|
288
|
+
Test Database: [H2 in-memory]
|
|
289
|
+
Test Data: [Builders, in-code, fixtures]
|
|
290
|
+
CI/CD: [Yes - GitHub Actions / No]
|
|
291
|
+
Build Tool: [Maven / Gradle / Ant]
|
|
292
|
+
|
|
293
|
+
Is this correct? (Yes/No)
|
|
294
|
+
|
|
295
|
+
````
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
### 📄 Generate Test Configuration
|
|
300
|
+
|
|
301
|
+
**Generate Maven Surefire configuration:**
|
|
302
|
+
```xml
|
|
303
|
+
<plugin>
|
|
304
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
305
|
+
<artifactId>maven-surefire-plugin</artifactId>
|
|
306
|
+
<version>3.0.0</version>
|
|
307
|
+
</plugin>
|
|
308
|
+
````
|
|
309
|
+
|
|
310
|
+
**Generate JaCoCo configuration:**
|
|
311
|
+
|
|
312
|
+
```xml
|
|
313
|
+
<plugin>
|
|
314
|
+
<groupId>org.jacoco</groupId>
|
|
315
|
+
<artifactId>jacoco-maven-plugin</artifactId>
|
|
316
|
+
<version>0.8.10</version>
|
|
317
|
+
<executions>
|
|
318
|
+
<execution>
|
|
319
|
+
<goals>
|
|
320
|
+
<goal>prepare-agent</goal>
|
|
321
|
+
</goals>
|
|
322
|
+
</execution>
|
|
323
|
+
<execution>
|
|
324
|
+
<id>report</id>
|
|
325
|
+
<phase>test</phase>
|
|
326
|
+
<goals>
|
|
327
|
+
<goal>report</goal>
|
|
328
|
+
</goals>
|
|
329
|
+
</execution>
|
|
330
|
+
</executions>
|
|
331
|
+
</plugin>
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
**Update `docs/DEVELOPMENT.md`:**
|
|
335
|
+
|
|
336
|
+
- Testing strategy
|
|
337
|
+
- How to run tests
|
|
338
|
+
- Test coverage goals
|
|
339
|
+
- CI/CD integration
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
**Next Phase:** Phase 7 - Packaging & Deployment (15-20 min)
|
|
344
|
+
|
|
345
|
+
Read: `.ai-flow/prompts/desktop/flow-build-phase-7.md`
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
**Last Updated:** 2025-02-03
|
|
350
|
+
**Version:** 1.0.0
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
## PHASE 7: Packaging & Deployment (15-20 min)
|
|
2
|
+
|
|
3
|
+
> **Order for this phase:** 7.1 → 7.2 → 7.3 → 7.4 → 7.5
|
|
4
|
+
|
|
5
|
+
### Objective
|
|
6
|
+
|
|
7
|
+
Define how the desktop application will be packaged, distributed, and deployed to end users.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 7.1 Packaging Format
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
How will you package your application?
|
|
15
|
+
|
|
16
|
+
A) ☕ Executable JAR - Simple distribution
|
|
17
|
+
- java -jar myapp.jar
|
|
18
|
+
- Requires JRE installed
|
|
19
|
+
- Cross-platform
|
|
20
|
+
- Best for: Developers, technical users
|
|
21
|
+
|
|
22
|
+
B) 🚀 Native Executable - Platform-specific
|
|
23
|
+
- Windows: .exe
|
|
24
|
+
- macOS: .app
|
|
25
|
+
- Linux: binary
|
|
26
|
+
- Includes JRE (self-contained)
|
|
27
|
+
- Tools: jpackage (Java 14+), GraalVM native-image
|
|
28
|
+
|
|
29
|
+
C) 💼 Installer Package - Professional distribution
|
|
30
|
+
- Windows: .msi, .exe (NSIS, Inno Setup, WiX)
|
|
31
|
+
- macOS: .dmg, .pkg
|
|
32
|
+
- Linux: .deb, .rpm, AppImage, Snap, Flatpak
|
|
33
|
+
- Includes JRE, auto-updates, shortcuts
|
|
34
|
+
|
|
35
|
+
D) ☁️ Java Web Start (deprecated) - Legacy
|
|
36
|
+
- JNLP files
|
|
37
|
+
- Not recommended for new apps
|
|
38
|
+
|
|
39
|
+
Your primary packaging: __
|
|
40
|
+
Your secondary packaging: __
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 7.2 Build Configuration
|
|
46
|
+
|
|
47
|
+
**For Maven:**
|
|
48
|
+
|
|
49
|
+
```xml
|
|
50
|
+
<!-- Maven Assembly Plugin - Fat JAR -->
|
|
51
|
+
<plugin>
|
|
52
|
+
<artifactId>maven-assembly-plugin</artifactId>
|
|
53
|
+
<configuration>
|
|
54
|
+
<archive>
|
|
55
|
+
<manifest>
|
|
56
|
+
<mainClass>com.company.app.Main</mainClass>
|
|
57
|
+
</manifest>
|
|
58
|
+
</archive>
|
|
59
|
+
<descriptorRefs>
|
|
60
|
+
<descriptorRef>jar-with-dependencies</descriptorRef>
|
|
61
|
+
</descriptorRefs>
|
|
62
|
+
</configuration>
|
|
63
|
+
</plugin>
|
|
64
|
+
|
|
65
|
+
<!-- Maven Shade Plugin - Fat JAR (alternative) -->
|
|
66
|
+
<plugin>
|
|
67
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
68
|
+
<artifactId>maven-shade-plugin</artifactId>
|
|
69
|
+
<executions>
|
|
70
|
+
<execution>
|
|
71
|
+
<phase>package</phase>
|
|
72
|
+
<goals>
|
|
73
|
+
<goal>shade</goal>
|
|
74
|
+
</goals>
|
|
75
|
+
</execution>
|
|
76
|
+
</executions>
|
|
77
|
+
</plugin>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**For Gradle:**
|
|
81
|
+
|
|
82
|
+
```groovy
|
|
83
|
+
// Fat JAR
|
|
84
|
+
jar {
|
|
85
|
+
manifest {
|
|
86
|
+
attributes 'Main-Class': 'com.company.app.Main'
|
|
87
|
+
}
|
|
88
|
+
from {
|
|
89
|
+
configurations.runtimeClasspath.collect {
|
|
90
|
+
it.isDirectory() ? it : zipTree(it)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Or use Shadow plugin
|
|
96
|
+
plugins {
|
|
97
|
+
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**For Ant (NetBeans):**
|
|
102
|
+
|
|
103
|
+
```xml
|
|
104
|
+
<target name="jar" depends="compile">
|
|
105
|
+
<jar destfile="dist/myapp.jar" basedir="build/classes">
|
|
106
|
+
<manifest>
|
|
107
|
+
<attribute name="Main-Class" value="com.company.app.Main"/>
|
|
108
|
+
<attribute name="Class-Path" value="lib/dependency.jar"/>
|
|
109
|
+
</manifest>
|
|
110
|
+
</jar>
|
|
111
|
+
</target>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 7.3 Native Packaging
|
|
117
|
+
|
|
118
|
+
**Using jpackage (Java 14+):**
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
jpackage --input target/ \
|
|
122
|
+
--name MyApp \
|
|
123
|
+
--main-jar myapp.jar \
|
|
124
|
+
--main-class com.company.app.Main \
|
|
125
|
+
--type [exe|dmg|deb|rpm|app-image] \
|
|
126
|
+
--icon src/main/resources/icon.ico \
|
|
127
|
+
--app-version 1.0.0 \
|
|
128
|
+
--vendor "Company Name" \
|
|
129
|
+
--copyright "Copyright 2025" \
|
|
130
|
+
--description "My Desktop Application"
|
|
131
|
+
|
|
132
|
+
Platform-specific options:
|
|
133
|
+
- Windows: --win-dir-chooser, --win-menu, --win-shortcut
|
|
134
|
+
- macOS: --mac-package-identifier com.company.app, --mac-sign
|
|
135
|
+
- Linux: --linux-shortcut, --linux-menu-group
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Using GraalVM Native Image:**
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
native-image -jar myapp.jar \
|
|
142
|
+
--no-fallback \
|
|
143
|
+
-H:Name=myapp \
|
|
144
|
+
-H:+ReportExceptionStackTraces
|
|
145
|
+
|
|
146
|
+
Benefits:
|
|
147
|
+
- Instant startup (no JVM warmup)
|
|
148
|
+
- Lower memory footprint
|
|
149
|
+
- No JRE required
|
|
150
|
+
Limitations:
|
|
151
|
+
- Reflection requires configuration
|
|
152
|
+
- Dynamic class loading limited
|
|
153
|
+
- Build time longer
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Third-party tools:**
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
A) Launch4j (Windows .exe wrapper)
|
|
160
|
+
- Wraps JAR in .exe
|
|
161
|
+
- JRE bundling
|
|
162
|
+
- Icon, splash screen
|
|
163
|
+
|
|
164
|
+
B) exe4j (Commercial Windows wrapper)
|
|
165
|
+
- Professional .exe generation
|
|
166
|
+
- Code signing support
|
|
167
|
+
|
|
168
|
+
C) install4j (Commercial multi-platform)
|
|
169
|
+
- Windows, macOS, Linux
|
|
170
|
+
- Auto-updates, licensing
|
|
171
|
+
|
|
172
|
+
Your choice: __
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 7.4 Distribution & Installation
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
How will users install your application?
|
|
181
|
+
|
|
182
|
+
A) 📦 Download from website
|
|
183
|
+
- Direct download link
|
|
184
|
+
- Manual installation
|
|
185
|
+
- No auto-updates
|
|
186
|
+
|
|
187
|
+
B) 🏪 App Store distribution
|
|
188
|
+
- Windows: Microsoft Store
|
|
189
|
+
- macOS: Mac App Store
|
|
190
|
+
- Linux: Snap Store, Flathub
|
|
191
|
+
- Requires app signing, review process
|
|
192
|
+
|
|
193
|
+
C) 📦 Package managers
|
|
194
|
+
- Windows: Chocolatey, Winget
|
|
195
|
+
- macOS: Homebrew
|
|
196
|
+
- Linux: apt, yum, pacman
|
|
197
|
+
|
|
198
|
+
D) 🔄 Auto-update system
|
|
199
|
+
- Check for updates on launch
|
|
200
|
+
- Download and install updates
|
|
201
|
+
- Libraries: Update4j, AutoUpdater
|
|
202
|
+
|
|
203
|
+
Your distribution method: __
|
|
204
|
+
|
|
205
|
+
Installation options:
|
|
206
|
+
- Install for all users vs current user?
|
|
207
|
+
- Desktop shortcut?
|
|
208
|
+
- Start menu entry?
|
|
209
|
+
- Auto-start on login?
|
|
210
|
+
- File associations?
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## 7.5 Code Signing & Security
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
Will you sign your application?
|
|
219
|
+
|
|
220
|
+
**Windows:**
|
|
221
|
+
A) ✅ Code signing certificate
|
|
222
|
+
- .pfx/.p12 certificate
|
|
223
|
+
- Prevents "Unknown publisher" warnings
|
|
224
|
+
- Required for SmartScreen reputation
|
|
225
|
+
- Tools: SignTool.exe
|
|
226
|
+
|
|
227
|
+
B) ❌ No signing (development only)
|
|
228
|
+
|
|
229
|
+
**macOS:**
|
|
230
|
+
A) ✅ Apple Developer ID certificate
|
|
231
|
+
- Required for distribution outside App Store
|
|
232
|
+
- Gatekeeper approval
|
|
233
|
+
- Notarization (macOS 10.15+)
|
|
234
|
+
- Tools: codesign, xcrun altool
|
|
235
|
+
|
|
236
|
+
B) ❌ No signing (development only)
|
|
237
|
+
|
|
238
|
+
**Linux:**
|
|
239
|
+
- GPG signing for repositories
|
|
240
|
+
- AppImage signatures
|
|
241
|
+
|
|
242
|
+
Your signing strategy: __
|
|
243
|
+
|
|
244
|
+
**Distribution Security:**
|
|
245
|
+
- Provide checksums? (SHA-256)
|
|
246
|
+
- HTTPS downloads only?
|
|
247
|
+
- Signature verification instructions?
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
### Phase 7 Output
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
📋 PHASE 7 SUMMARY:
|
|
256
|
+
|
|
257
|
+
Packaging Format: [Executable JAR / Native executable / Installer]
|
|
258
|
+
Build Tool: [Maven / Gradle / Ant]
|
|
259
|
+
Native Packaging: [jpackage / GraalVM / Launch4j / exe4j]
|
|
260
|
+
Distribution: [Website download / App Store / Package manager / Auto-update]
|
|
261
|
+
Platform Packages:
|
|
262
|
+
- Windows: [.exe, .msi]
|
|
263
|
+
- macOS: [.app, .dmg, .pkg]
|
|
264
|
+
- Linux: [.deb, .rpm, AppImage]
|
|
265
|
+
Code Signing: [Yes - Windows/macOS / No]
|
|
266
|
+
Installation Options: [Desktop shortcut, Start menu, File associations]
|
|
267
|
+
|
|
268
|
+
Is this correct? (Yes/No)
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
### 📄 Generate Build Scripts
|
|
274
|
+
|
|
275
|
+
**Generate Maven packaging configuration**
|
|
276
|
+
**Generate Gradle packaging configuration**
|
|
277
|
+
**Generate jpackage script (shell/bat)**
|
|
278
|
+
**Generate distribution README**
|
|
279
|
+
|
|
280
|
+
Update `docs/DEPLOYMENT.md`:
|
|
281
|
+
|
|
282
|
+
- Build instructions
|
|
283
|
+
- Packaging process
|
|
284
|
+
- Distribution methods
|
|
285
|
+
- Installation guide
|
|
286
|
+
- Code signing procedures
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
**Next Phase:** Phase 8 - Project Setup & Final Docs (10-15 min)
|
|
291
|
+
|
|
292
|
+
Read: `.ai-flow/prompts/desktop/flow-build-phase-8.md`
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
**Last Updated:** 2025-02-03
|
|
297
|
+
**Version:** 1.0.0
|