Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/gradle-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ name: Gradle build smoke
# the Gradle plugin reuses the Maven engine
# gradle-cn1lib-test.sh a Gradle-built cn1lib consumed by a Gradle app
# AND a Maven app
# gradle-flutter-test.sh src/main/flutter: same classes and assets both ways,
# mapped to the Dart source; removed sources leave nothing
# gradle-migrate-test.sh Ant and Maven to Gradle; legacy .cn1lib refused
# gradle-tools-test.sh Settings opens, and renders, from cn1:settings and
# from ./gradlew settings
Expand All @@ -34,6 +36,9 @@ on:
- 'maven/css-compiler/**'
- 'maven/css-cli/**'
- 'maven/build-engine/**'
- 'maven/dart-transpiler/**'
- 'maven/dart-runtime/**'
- 'maven/flutter-runtime/**'
- 'maven/project-model/**'
- 'maven/cn1app-archetype/**'
- 'maven/backend/**'
Expand All @@ -58,6 +63,9 @@ on:
- 'maven/css-compiler/**'
- 'maven/css-cli/**'
- 'maven/build-engine/**'
- 'maven/dart-transpiler/**'
- 'maven/dart-runtime/**'
- 'maven/flutter-runtime/**'
- 'maven/project-model/**'
- 'maven/cn1app-archetype/**'
- 'maven/backend/**'
Expand Down Expand Up @@ -135,12 +143,21 @@ jobs:
cd maven
mvn archetype:update-local-catalog -Plocal-dev-javase
mvn archetype:crawl -Plocal-dev-javase
# The Flutter runtime compiles at release 17, so the JDK 8 reactor
# above leaves it out (the flutter-modules profile is JDK activated).
- name: Build the Flutter runtime
run: |
cd maven
JAVA_HOME="$GRADLE_JAVA_HOME" mvn -B -ntp install -pl dart-runtime,flutter-runtime -DskipTests -Dmaven.javadoc.skip=true
- name: Gradle application
working-directory: maven/integration-tests
run: xvfb-run -a bash gradle-app-test.sh
- name: Maven and Gradle upload parity
working-directory: maven/integration-tests
run: bash gradle-maven-parity-test.sh
- name: Flutter sources, Maven and Gradle
working-directory: maven/integration-tests
run: bash gradle-flutter-test.sh
- name: Gradle cn1lib, consumed by Gradle and Maven
working-directory: maven/integration-tests
# DISPLAY and WAYLAND_DISPLAY are cleared on purpose, and this must
Expand Down
1 change: 1 addition & 0 deletions CodenameOne/src/com/codename1/social/AppleSignIn.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ public void run() {
return;
}
AppleSignInResult result = parsePackedResult(packed);
result.rawNonce = plainNonce;
if (result.getIdentityToken() == null) {
callback.onError("Apple Sign-In returned no identity token");
return;
Expand Down
10 changes: 10 additions & 0 deletions CodenameOne/src/com/codename1/social/AppleSignInResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public final class AppleSignInResult {
String userId;
String email;
String fullName;
String rawNonce;

AppleSignInResult() {}

Expand Down Expand Up @@ -74,4 +75,13 @@ public String getEmail() {
public String getFullName() {
return fullName;
}

/// The nonce this sign-in sent, before hashing: the native sheet sends Apple its
/// SHA-256, so the identity token's `nonce` claim is that hash, and a service that
/// checks the token against the request -- Firebase Authentication's
/// `signInWithIdp` -- needs this value to recompute it. `null` for the web flow,
/// whose request carries an unhashed nonce of its own.
public String getRawNonce() {
return rawNonce;
}
}
2 changes: 1 addition & 1 deletion CodenameOne/src/com/codename1/ui/plaf/UIManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ private static Font parseFont(String fontStr) {
/// ```java
/// Resources theme = null;
/// try {
/// theme = Resources.openLayered(resourceFile);
/// theme = Resources.openLayered("/theme");
/// UIManager.getInstance().setThemeMap(theme.getThemeMap(theme.getThemeResourceNames()[0]));
/// } catch (IOException e) {
/// Log.e(e);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Codename One designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Codename One through http://www.codenameone.com/ if you
* need additional information or have any questions.
*/
package com.codenameone.developerguide.flutter;

import com.codename1.flutter.BuildContext;
import com.codename1.flutter.StatelessWidget;
import com.codename1.flutter.Widget;
import com.codename1.flutter.widgets.Text;

/// The Java half of the guide's example stub pack: the class `plugin_lottie.dart`
/// names with `@JavaName`.
// tag::flutter-stub-pack-java-001[]
public class Lottie extends StatelessWidget {
private String name;

public static Lottie asset(String name, Double width, Double height,
Boolean repeat, Object fit) {
Lottie l = new Lottie();
l.name = name;
return l;
}

@Override
public Widget build(BuildContext context) {
// Play the animation; a label stands in for it here.
return new Text(name);
}
}
// end::flutter-stub-pack-java-001[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Generated from docs/developer-guide source blocks. Edit the guide snippets here, not inline.

// tag::flutter-import-report-json-001[]
{"package": "ui_kit", "status": "unsupported",
"note": "depends on vector_graphics_compiler, which needs dart:ffi",
"cause": "needs dart:ffi",
"chain": ["ui_kit", "vector_graphics_compiler"],
"reachedFrom": ["lib/login/login_screen.dart"]}
// end::flutter-import-report-json-001[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Generated from docs/developer-guide source blocks. Edit the guide snippets here, not inline.

// tag::flutter-stub-pack-dart-001[]
// cn1:package lottie
// cn1:covers lottie Lottie.asset over a Codename One animation
@JavaName('com.codenameone.developerguide.flutter.Lottie')
class Lottie extends Widget {
@Unapplied('fit')
external static Lottie asset(String name, {double? width, double? height,
bool repeat, BoxFit? fit});
}
// end::flutter-stub-pack-dart-001[]
Loading
Loading