You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/TODO.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@
10
10
## Tooling & Build Flow Modernization
11
11
12
12
-[ ] Rewrite `Working-With-CodenameOne-Sources.asciidoc` around the Maven multi-module build in `/maven`, including local test commands, dependency management tips, and how our GitHub Actions replace the old Ant targets for CI.【F:docs/developer-guide/Working-With-CodenameOne-Sources.asciidoc†L1-L85】【F:maven/README.adoc†L1-L68】
13
+
-[ ] Rework `Working-With-CodenameOne-Sources.asciidoc` to fold in the Maven project workflow guidance now embedded in the developer guide and eliminate duplicated setup steps between the chapters.【F:docs/developer-guide/Working-With-CodenameOne-Sources.asciidoc†L1-L85】【F:docs/developer-guide/Maven-Project-Workflow.asciidoc†L1-L14】
13
14
-[ ] Retire or substantially revise `Travis-CI-Integration.asciidoc` to highlight our current CI guidance (GitHub Actions templates, self-hosted options) and archive Travis-specific screenshots and steps.【F:docs/developer-guide/Travis-CI-Integration.asciidoc†L1-L112】
14
15
-[ ] Update the Designer/tooling coverage in `basics.asciidoc` so it walks through launching the modern Designer distribution from Maven projects without relying on `designer_1.jar` shell commands.【F:docs/developer-guide/basics.asciidoc†L1050-L1070】
15
16
-[ ] Rebuild `Working-With-The-GUI-Builder.asciidoc` around the current GUI Builder experience (with Java 11+ support, IntelliJ/VScode integration), moving legacy troubleshooting for `guibuilder_1.jar` into an appendix or "legacy" callout.【F:docs/developer-guide/Working-With-The-GUI-Builder.asciidoc†L1-L126】
Copy file name to clipboardExpand all lines: docs/developer-guide/Advanced-Topics-Under-The-Hood.asciidoc
+1-41Lines changed: 1 addition & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,6 @@ Here is the current list of supported arguments, notice that build hints are add
28
28
|android.installLocation
29
29
|Maps to android:installLocation manifest entry defaults to auto. Can also be set to internalOnly or preferExternal.
30
30
31
-
|android.gradle
32
-
|Deprecated, this mode is no longer supported. true/false defaults to false prior to 3.3 and true after. Uses Gradle instead of Ant to build the Android app
33
-
34
31
|android.xapplication
35
32
|defaults to an empty string. Allows developers of native Android code to add text within the application block to define things such as widgets, services etc.
36
33
@@ -88,7 +85,7 @@ Here is the current list of supported arguments, notice that build hints are add
88
85
|*Deprecated, please android.playService.+++*+++!* Indicates whether Goolge Play Services should be included into the build, defaults to false but that might change based on the functionality of the application and other build hints. Adding Google Play Services support allows us to use a more refined location implementation and invoke some Google specific functionality from native code.
|Allows including only a specific play services library portion. Notice that this setting conflicts with the deprecated `android.includeGPlayServices` and only works with the gradle build (which is on by default but can be toggled using `android.gradle`). +
88
+
|Allows including only a specific play services library portion. Notice that this setting conflicts with the deprecated `android.includeGPlayServices` and only works with the Gradle-based Android build pipeline. +
92
89
93
90
If none of the services are defined to true then plus, auth, base, analytics, gcm, location, maps & ads will be set to true. If one or more of the `android.playService` entries are defined to something then all entries will default to false.
94
91
@@ -2156,43 +2153,6 @@ In the drop target you can override the following methods:
2156
2153
2157
2154
2158
2155
2159
-
=== Continuous Integration & Release Engineering
2160
-
2161
-
Codename One was essentially built for continuous integration since the build servers are effectively a building block for such an architecture. However, there are several problems with that: the first of which is limited server capacity.
2162
-
2163
-
If all users would start sending builds with every commit the servers would instantly become unusable due to the heavy load. To circumvent this CI support is limited only on the Enterprise level which allows Codename One to stock more servers and cope with the rise in demand related to the feature.
2164
-
2165
-
To integrate with any CI solution just use the standard Ant targets such as `build-for-android-device`, `build-for-iphone-device` etc.
2166
-
2167
-
Normally, this would be a problem since the build is sent but since it isn't blocking you wouldn't get the build result and wouldn't be able to determine if the build passed or failed. To enable this just edit the build XML and add the attribute `automated="true"` to the codeNameOne tag in the appropriate
2168
-
targets.
2169
-
2170
-
This will deliver a `result.zip` file under the `dist` folder containing the binaries of a successful build. It will
2171
-
also block until the build is completed. This should be pretty easy to integrate with any CI system together with
Copy file name to clipboardExpand all lines: docs/developer-guide/Index.asciidoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -248,13 +248,13 @@ Import the generated Maven project into your preferred IDE and use the Codename
248
248
* *Eclipse* – use *File > Import > Existing Maven Projects*, then use the Codename One launch shortcuts provided by the plugin for simulator and build tasks.
249
249
* *Command line* – invoke Maven goals directly whenever you need to integrate with CI/CD pipelines or scripting.
250
250
251
-
For deeper coverage of the Maven goals and project structure, see the https://shannah.github.io/codenameone-maven-manual/[Codename One Maven Manual].
251
+
For deeper coverage of the Maven goals, project structure, and automation tasks, continue with <<maven-project-workflow>>.
252
252
253
253
NOTE: Arbitrary Maven dependencies probably won't work for Codename One. Many dependencies assume a full JDK which Codename One can't provide and they often assume functionality that might not be available e.g. reflection, Spring, etc.
254
254
255
255
.Legacy onboarding resources
256
256
****
257
-
The retired Ant-based IDE plugins for NetBeans, Eclipse and IntelliJ IDEA – together with the simulator screenshots from those workflows – are still available in the legacy documentation for teams maintaining older projects. New projects should follow the Maven-based instructions above.
257
+
Legacy Ant-based project instructions remain available for teams maintaining older codebases. New projects should follow the Maven workflows described in this guide.
Copy file name to clipboardExpand all lines: docs/developer-guide/Maven-Appendix-Control-Center.adoc
+5-17Lines changed: 5 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,6 @@ The Codename One Settings app (aka Codename One Preferences, aka Control Center)
8
8
=== Opening Codename One Settings
9
9
10
10
==== Opening Codename One Settings from Command-line
11
-
++++
12
-
<env cli ></env>
13
-
++++
14
11
15
12
Use the `run.sh` (or run.bat, if on Windows) to open Codename One settings:
16
13
@@ -20,36 +17,27 @@ Use the `run.sh` (or run.bat, if on Windows) to open Codename One settings:
20
17
----
21
18
22
19
==== Opening Codename One Settings from IntelliJ
23
-
++++
24
-
<env intellij ></env>
25
-
++++
26
20
27
21
Click on the "Configuration" menu in the upper right of the toolbar, and select "Tools" > "Codename One Settings" as shown below.
28
22
29
-
image::images/intellij-open-settings.png[]
23
+
image::img/intellij-open-settings.png[]
30
24
31
25
32
26
==== Opening Codename One Settings from NetBeans
33
-
++++
34
-
<env netbeans></env>
35
-
++++
36
27
37
28
Right-click on the project in the project inspector, and select "Maven" > "Open Control Center" as shown below:
38
29
39
-
image::images/netbeans-open-control-center.png[]
30
+
image::img/netbeans-open-control-center.png[]
40
31
41
32
==== Opening Codename One Settings from Eclipse
42
-
++++
43
-
<env eclipse ></env>
44
-
++++
45
33
46
-
Press the image:images/eclipse-run-as-button.png[] button, and select the "_My Project_ Settings" option. (Where _My Project_ is the name of your project). E.g.
34
+
Press the image:img/eclipse-run-as-button.png[] button, and select the "_My Project_ Settings" option. (Where _My Project_ is the name of your project). E.g.
47
35
48
-
image:images/eclipse-open-settings.png[]
36
+
image:img/eclipse-open-settings.png[]
49
37
50
38
[#dashboard]
51
39
=== The Dashboard
52
40
53
41
Once inside Codename One Settings, you'll see a dashboard like the following:
. Check the "Create from Archetype" checkbox. image:images/intellij-create-from-archetype-checkbox.png[]. This should allow you to choose from of archetypes that are already known to IntelliJ.
. Check the "Create from Archetype" checkbox. image:img/intellij-create-from-archetype-checkbox.png[]. This should allow you to choose from of archetypes that are already known to IntelliJ.
89
83
. If you don't see an option for "com.codenameone:cn1lib-archetype", then IntelliJ doesn't know about it yet. If, however you *do* see this option, you can skip to the next step. Press the "Add Archetype..." button. This will display a dialog for you to enter the details of the archetype.
90
84
+
91
-
image::images/intellij-add-archetype.png[]
85
+
image::img/intellij-add-archetype.png[]
92
86
+
93
87
Fill in this dialog as shown in the above image. Specifically `groupId`="com.codenameone", `artifactId`="cn1lib-archetype", and `version`="LATEST"
94
88
+
95
89
Then press "OK".
96
90
. Select the option that says "com.codenameone:cn1lib-archetype"
. This will display a form where you can enter the details of your project such as its location (where you want to create the project folder), the name, the artifact ID, and the groupID. Fill in this form as you see fit.
. The final form in this wizard summarizes the project details and gives you an opportunity to add additional properties to pass to the `archetype:generate` goal. In our case we don't need to add any additional properties. If the information looks correct, you can just press "Next".
Enter "com.codenameone" or "cn1lib-archetype" into the search field. Then select "cn1lib-archetype" in the "Known archetypes:" panel. This will prefill the *Group ID*, *Artifact ID* and *Version* fields for you. You may want to change *Version* to LATEST to ensure that it tries to use the latest available version of the archetype.
130
121
+
131
122
Then click "Next"
132
123
. This will bring you to the "Name and Location" panel of the wizard.
This top-level view of the module structure may seem daunting. Most of your development will occur inside the "common" module. If we expand that module it will look more familiar to developers who have used the old Ant project structure:
This top-level view of the modules doesn't provide a clear view of the project landscape, however, since 99% of your development will occur inside the `common` submodule. Let's open that "common" sub-module project as well and take a peek.
213
195
214
196
Right click on the "Common" sub-module, and select "Open Project" as shown below:
In this screenshot I have expanded "Source Packages" and "Other Sources/css" to highlight where your Java source files and CSS source files will be located.
223
205
224
206
The project inspector hides a few important files, however, so here is a screenshot of the File inspector for the common project:
In this screenshot, I have expanded the _common/src/main/css_ and _common/src/main/java_ directories as this is where most of your module source will go.
238
217
239
-
===== CLI
240
-
++++
241
-
<env cli></env>
242
-
++++
218
+
===== Command Line
243
219
244
220
If we do a file listing on the project directory, it shows the following:
245
221
@@ -375,10 +351,7 @@ Other non-java resources that you want to have included in the classpath.
375
351
[#building-library]
376
352
==== Building the Library
377
353
378
-
===== CLI
379
-
++++
380
-
<env cli></env>
381
-
++++
354
+
===== Command Line
382
355
383
356
To build the library, simply run the "install" goal on the root module as follows:
384
357
@@ -387,34 +360,25 @@ To build the library, simply run the "install" goal on the root module as follow
387
360
mvn install
388
361
----
389
362
390
-
===== IntelliJ
391
-
++++
392
-
<env intellij></env>
393
-
++++
363
+
===== IntelliJ IDEA IDEA
394
364
395
-
Press the "build" image:images/intellij-build-icon.png[] button on the toolbar.
365
+
Press the "build" image:img/intellij-build-icon.png[] button on the toolbar.
396
366
397
367
===== NetBeans
398
-
++++
399
-
<env netbeans></env>
400
-
++++
401
368
402
369
Right click on the "root" module in the project explorer and select "Build".
403
370
404
-
image::images/netbeans-right-click-build.png[]
371
+
image::img/netbeans-right-click-build.png[]
405
372
406
373
IMPORTANT: You must build the root module and not one of the submodules.
407
374
408
-
Alternatively you could have just selected the "root" module in the project explorer and pressed the "build" image:images/netbeans-build-button.png[] button on the toolbar.
375
+
Alternatively you could have just selected the "root" module in the project explorer and pressed the "build" image:img/netbeans-build-button.png[] button on the toolbar.
409
376
410
-
===== Eclipse
411
-
++++
412
-
<env eclipse></env>
413
-
++++
377
+
===== Eclipse IDE IDE
414
378
415
379
Right click on the "root" module in the project explorer and select _Run as_ > _Maven Install_
416
380
417
-
image::images/eclipse-build-cn1lib.png[]
381
+
image::img/eclipse-build-cn1lib.png[]
418
382
419
383
TIP: If the build fails for any reason, check to make sure that your project is using the latest version of the Codename One plugin. You can do this by opening the _pom.xml_ file, and changing the `cn1.version` and `cn1.plugin.version` properties to reference the latest version. Check for the latest version https://search.maven.org/artifact/com.codenameone/codenameone[here].
0 commit comments