Skip to content

Commit a85d66b

Browse files
committed
Testing CI works correctly
1 parent 6e790e3 commit a85d66b

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

CodenameOne/src/com/codename1/ui/Form.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,10 @@ public class Form extends Container {
179179
public Form() {
180180
this(new FlowLayout());
181181
}
182-
182+
183+
public void testCIWorks() {
184+
}
185+
183186
/**
184187
* Constructor that accepts a layout
185188
*

scripts/build-android-app.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ else
2828
exit 1
2929
fi
3030

31-
# --- Tool validations (unchanged) ---
31+
# --- Tool validations ---
3232
if [ -z "${JAVA_HOME:-}" ] || [ ! -x "$JAVA_HOME/bin/java" ]; then
3333
ba_log "JAVA_HOME validation failed. Current value: ${JAVA_HOME:-<unset>}" >&2
3434
if [ -n "${JAVA_HOME:-}" ]; then
@@ -100,7 +100,7 @@ MAVEN_CMD=(
100100
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
101101
)
102102

103-
# --- Generate app skeleton (unchanged) ---
103+
# --- Generate app skeleton ---
104104
ba_log "Generating Codename One application skeleton via codenameone-maven-plugin"
105105
(
106106
cd "$WORK_DIR"
@@ -121,7 +121,7 @@ APP_DIR="$WORK_DIR/$ARTIFACT_ID"
121121
SETTINGS_FILE="$APP_DIR/common/codenameone_settings.properties"
122122
[ -f "$SETTINGS_FILE" ] || { ba_log "codenameone_settings.properties not found at $SETTINGS_FILE" >&2; exit 1; }
123123

124-
# --- Read settings WITHOUT Python ---
124+
# --- Read settings ---
125125
read_prop() { grep -E "^$1=" "$SETTINGS_FILE" | head -n1 | cut -d'=' -f2- | sed 's/^[[:space:]]*//'; }
126126

127127
PACKAGE_NAME="$(read_prop 'codename1.packageName' || true)"
@@ -152,7 +152,7 @@ sed -e "s|@PACKAGE@|$PACKAGE_NAME|g" \
152152
-e "s|@MAIN_NAME@|$MAIN_NAME|g" \
153153
"$TEMPLATE" > "$MAIN_FILE"
154154

155-
# --- Ensure codename1.mainName is set WITHOUT Python ---
155+
# --- Ensure codename1.mainName is set ---
156156
ba_log "Setting codename1.mainName to $MAIN_NAME"
157157
if grep -q '^codename1.mainName=' "$SETTINGS_FILE"; then
158158
# GNU sed in CI: in-place edit without backup
@@ -163,7 +163,7 @@ fi
163163
# Ensure trailing newline
164164
tail -c1 "$SETTINGS_FILE" | read -r _ || echo >> "$SETTINGS_FILE"
165165

166-
# --- Normalize Codename One versions WITHOUT Python (use Maven Versions Plugin) ---
166+
# --- Normalize Codename One versions (use Maven Versions Plugin) ---
167167
ba_log "Normalizing Codename One Maven coordinates to $CN1_VERSION"
168168
# Set property codenameone.version where present
169169
xvfb-run -a "${MAVEN_CMD[@]}" -q -f "$APP_DIR/pom.xml" \
@@ -190,7 +190,7 @@ xvfb-run -a "${MAVEN_CMD[@]}" -q -f "$APP_DIR/pom.xml" \
190190
-DgenerateBackupPoms=false \
191191
-DprocessAllModules=true || true
192192

193-
# --- Build Android gradle project (unchanged) ---
193+
# --- Build Android gradle project ---
194194
ba_log "Building Android gradle project using Codename One port"
195195
xvfb-run -a "${MAVEN_CMD[@]}" -q -f "$APP_DIR/pom.xml" package \
196196
-DskipTests \

scripts/templates/HelloCodenameOne.java.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class @MAIN_NAME@ {
1818
return;
1919
}
2020
Form helloForm = new Form("Hello Codename One", new BorderLayout());
21+
helloForm.testCIWorks();
2122
helloForm.add(BorderLayout.CENTER, new Label("Hello Codename One"));
2223
helloForm.show();
2324
}

0 commit comments

Comments
 (0)