Skip to content

Commit c0992f3

Browse files
committed
Merge branch 'master' into codex/task-title
2 parents d8db565 + a1d9ce8 commit c0992f3

34 files changed

+7365
-424
lines changed

.github/workflows/developer-guide-docs.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,20 @@ jobs:
114114
echo "REV_HUMAN_DATE=$REV_HUMAN_DATE"
115115
} >> "$GITHUB_ENV"
116116
117+
- name: Determine Codename One release version
118+
run: |
119+
set -euo pipefail
120+
VERSION="$(python3 scripts/developer-guide/determine_release_version.py)"
121+
if [ -z "$VERSION" ]; then
122+
echo "Unable to determine Codename One release version" >&2
123+
exit 1
124+
fi
125+
echo "Using Codename One release version: $VERSION" >&2
126+
{
127+
echo "CN1_RELEASE_VERSION=$VERSION"
128+
echo "CN1_PLUGIN_RELEASE_VERSION=$VERSION"
129+
} >> "$GITHUB_ENV"
130+
117131
- name: Render publication cover artwork
118132
run: |
119133
set -euo pipefail

CodenameOne/src/com/codename1/contacts/ContactsModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class ContactsModel extends DefaultListModel {
4646
* @param ids the contact ids we would like this model to handle
4747
*/
4848
public ContactsModel(String... ids) {
49-
super(ids);
49+
super((Object[]) ids);
5050
}
5151

5252
/**

CodenameOne/src/com/codename1/ui/spinner/Picker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public void actionPerformed(ActionEvent evt) {
187187
gs.setRenderingPrototype((String) renderingPrototype);
188188
}
189189
String[] strArr = (String[]) metaData;
190-
gs.setModel(new DefaultListModel(strArr));
190+
gs.setModel(new DefaultListModel((Object[]) strArr));
191191
if (value != null) {
192192
int slen = strArr.length;
193193
for (int iter = 0; iter < slen; iter++) {

CodenameOne/src/com/codename1/ui/util/UIBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ private Component createComponent(DataInputStream in, Container parent, Containe
14151415
items[iter] = in.readUTF();
14161416
}
14171417
if (!setListModel(((List) cmp))) {
1418-
((List) cmp).setModel(new DefaultListModel(items));
1418+
((List) cmp).setModel(new DefaultListModel((Object[]) items));
14191419
}
14201420
break;
14211421

Ports/Android/src/com/codename1/impl/android/AndroidAsyncView.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,10 @@ public void run() {
409409
pendingRenderingOperations = tmp;
410410
try {
411411
for (AsyncOp o : renderingOperations) {
412-
o.prepare();
412+
// can happen due to synchronization issues see: https://www.reddit.com/r/cn1/comments/1oo43in/error_while_using_app/
413+
if (o != null) {
414+
o.prepare();
415+
}
413416
}
414417
} catch (java.util.ConcurrentModificationException ex) {
415418
// This is a race condition that sometimes occurs

docs/developer-guide/About-This-Guide.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ While this guide focuses on tutorial and conceptual material, the complete API r
1717

1818
This document includes content from multiple authors and community wiki edits. If you edit pages within the guide feel free to add your name here alphabetized by surname:
1919

20-
- https://github.com/codenameone/[Shai Almog]
20+
- https://github.com/shai-almog[Shai Almog]
2121
- https://github.com/Isborg[Ismael Baum]
2222
- https://twitter.com/ericcoolmandev[Eric Coolman]
2323
- http://github.com/chen-fishbein/[Chen Fishbein]

docs/developer-guide/Index.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ IMPORTANT: Codename One doesn't send source code to the build cloud, only compil
3939

4040
The build servers allow building native iOS Apps without a Mac and native Windows apps without a Windows machine. They remove the need to install/update complex toolchains and simplify the process of building a native app to a right click.
4141

42+
Even though the build servers streamline delivery, Codename One also supports fully local builds. You can install the toolchain on your own hardware and follow the workflows in <<maven-project-workflow>> and <<working-with-codename-one-sources>> to compile, package, and test apps without leaving your desktop environment.
43+
4244
E.g.: Since building native iOS applications requires a Mac OS X machine with a recent version of xcode Codename One maintains such machines in the cloud. When developers send an iOS build such a Mac will be used to generate C source code using https://github.com/codenameone/CodenameOne/tree/master/vm[ParparVM] and it will then compile the C source code using xcode & sign the resulting binary using xcode. You can install the binary to your device or build a distribution binary for the appstore. Since C code is generated it also means that your app will be "future proof" in a case of changes from Apple. You can also inject Objective-C native code into the app while keeping it 100% portable thanks to the "native interfaces" capability of Codename One.
4345

4446
Subscribers can receive the C source code back using the include sources feature of Codename One and use those sources for benchmarking, debugging on devices etc.

docs/developer-guide/Maven-Getting-Started.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ The https://shannah.github.io/cn1app-archetype-kotlin-template/getting-started.h
7676

7777
Here is an example which generates a project based on the bare-bones kotlin template:
7878

79-
[source,bash]
79+
[source,bash,subs="+attributes"]
8080
----
81-
mvn com.codenameone:codenameone-maven-plugin:7.0.19:generate-app-project \
81+
mvn com.codenameone:codenameone-maven-plugin:{cn1-plugin-release-version}:generate-app-project \
8282
-DarchetypeGroupId=$archetypeGroupId \
8383
-DarchetypeArtifactId=$archetypeArtifactId \
8484
-DarchetypeVersion=$archetypeVersion \
@@ -96,7 +96,7 @@ Like the `archetype:generate` goal, this will create the project in a directory
9696

9797
Some notes here:
9898

99-
. The `com.codenameone:codenameone-maven-plugin:7.0.19:generate-app-project` argument is the fully-qualified goal name for the `generate-app-project`. This is necessary since we aren't running this goal in the context of any existing project. You should adjust the version number (`7.0.19`) to reflect the https://search.maven.org/search?q=a:codenameone-maven-plugin[latest available Codename One version on Maven Central].
99+
. The `com.codenameone:codenameone-maven-plugin:{cn1-plugin-release-version}:generate-app-project` argument is the fully-qualified goal name for the `generate-app-project`. This is necessary since we aren't running this goal in the context of any existing project. You should adjust the version number (`{cn1-plugin-release-version}`) to reflect the https://search.maven.org/search?q=a:codenameone-maven-plugin[latest available Codename One version on Maven Central].
100100
. The `archetypeGroupId`, `archetypeArtifactId`, and `archetypeVersion` parameters are the same as when using the `archetype:generate` goal, and they will (almost) always refer to the <<cn1app-archetype>>.
101101
. The `groupId`, `artifactId`, and `version` work the same as for the `archetype:generate` goal. That is, that they specify the coordinates for your newly created project.
102102
. The `mainName` specifies the Main class name for your app. This is just the class name, and should not include the full package. E.g. "MyApp", not "com.example.MyApp"
@@ -116,12 +116,12 @@ If you have an existing Codename One application project that uses the old Ant p
116116

117117
A minimal invocation of this goal would look like:
118118

119-
[source,bash]
119+
[source,bash,subs="+attributes"]
120120
----
121121
# Specify your the version of the codenameone-maven-plugin.
122122
# Find the latest version at
123123
# https://search.maven.org/search?q=a:codenameone-maven-plugin
124-
CN1VERSION=7.0.19
124+
CN1VERSION={cn1-plugin-release-version}
125125
mvn com.codenameone:codenameone-maven-plugin:$CN1VERSION:generate-app-project \
126126
-DgroupId=YOUR_GROUP_ID \
127127
-DartifactId=YOUR_ARTIFACT_ID \
@@ -137,7 +137,7 @@ After building the project, try running it to make sure that the migration worke
137137

138138
==== Command Line
139139

140-
[source,bash]
140+
[source,bash,subs="+attributes"]
141141
----
142142
cd myapp
143143
./run.sh
@@ -210,9 +210,9 @@ Let's consider a concrete example, now. Download the KitchenSink Ant project fr
210210

211211
The following is a bash script that uses curl to download this project as a zip file, and then converts it to a fully-functional Maven project.
212212

213-
[source,bash]
213+
[source,bash,subs="+attributes"]
214214
----
215-
CN1_VERSION=7.0.19
215+
CN1_VERSION={cn1-plugin-release-version}
216216
curl -L https://github.com/codenameone/KitchenSink/archive/v1.0-cn7.0.11.zip > master.zip
217217
unzip master.zip
218218
rm master.zip

docs/developer-guide/Maven-Project-Workflow.asciidoc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@ include::Maven-Getting-Started.adoc[leveloffset=+1]
88
include::Maven-Updating-Codename-One.adoc[leveloffset=+1]
99
include::Maven-Project-Templates.adoc[leveloffset=+1]
1010
include::Maven-Creating-CN1Libs.adoc[leveloffset=+1]
11-
include::Maven-Appendix-Archetypes.adoc[leveloffset=+1]
12-
include::Maven-Appendix-Goals.adoc[leveloffset=+1]
13-
include::Maven-Appendix-API.adoc[leveloffset=+1]
14-
include::Maven-Appendix-Control-Center.adoc[leveloffset=+1]
15-
include::Maven-Appendix-Rich-Properties.adoc[leveloffset=+1]
11+
12+
// The detailed Maven appendices now live alongside the other appendices at the end of the guide.

docs/developer-guide/Maven-Updating-Codename-One.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ You can also update your Codename One dependencies manually by modifying the `cn
4848

4949
E.g. Open the `pom.xml` file, and look for the following:
5050

51-
[source,xml]
51+
[source,xml,subs="+attributes"]
5252
----
53-
<cn1.plugin.version>7.0.19</cn1.plugin.version>
54-
<cn1.version>7.0.19</cn1.version>
53+
<cn1.plugin.version>{cn1-plugin-release-version}</cn1.plugin.version>
54+
<cn1.version>{cn1-release-version}</cn1.version>
5555
----
5656

5757
Change these values to reflect the latest version of the `codenameone-maven-plugin` found https://search.maven.org/artifact/com.codenameone/codenameone-maven-plugin[here].

0 commit comments

Comments
 (0)