-
Notifications
You must be signed in to change notification settings - Fork 433
Jules PR #4094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Jules PR #4094
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Submodule cn1-maven-archetypes
added at
639042
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <groupId>com.mycompany</groupId> | ||
| <artifactId>device-runner-test</artifactId> | ||
| <version>1.0-SNAPSHOT</version> | ||
|
|
||
| <properties> | ||
| <maven.compiler.source>1.8</maven.compiler.source> | ||
| <maven.compiler.target>1.8</maven.compiler.target> | ||
| <codenameone.version>7.0.41</codenameone.version> | ||
| <codenameone.plugin.version>7.0.41</codenameone.plugin.version> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.codenameone</groupId> | ||
| <artifactId>codenameone-core</artifactId> | ||
| <version>${codenameone.version}</version> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>com.codenameone</groupId> | ||
| <artifactId>codenameone-maven-plugin</artifactId> | ||
| <version>${codenameone.plugin.version}</version> | ||
| <executions> | ||
| <execution> | ||
| <goals> | ||
| <goal>build</goal> | ||
| </goals> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| <profiles> | ||
| <profile> | ||
| <id>android</id> | ||
| <properties> | ||
| <codename1.platform>android</codename1.platform> | ||
| </properties> | ||
| </profile> | ||
| <profile> | ||
| <id>ios</id> | ||
| <properties> | ||
| <codename1.platform>ios</codename1.platform> | ||
| </properties> | ||
| </profile> | ||
| </profiles> | ||
| </project> | ||
19 changes: 19 additions & 0 deletions
19
scripts/DeviceRunnerTest/src/codenameone_settings.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # | ||
| #Mon Oct 27 12:12:51 IST 2025 | ||
| codename1.vendor=CodenameOne | ||
| codename1.displayName=DeviceRunnerTest | ||
| codename1.mainName=DeviceRunnerTest | ||
| codename1.ios.release.provision= | ||
| codename1.languageLevel=5 | ||
| codename1.ios.release.certificate= | ||
| codename1.ios.version=1.0 | ||
| codename1.secondaryTitle=DeviceRunnerTest | ||
| codename1.android.keystorePassword= | ||
| codename1.android.keystoreAlias= | ||
| codename1.android.keyPassword= | ||
| codename1.packageName=com.mycompany.app | ||
| codename1.ios.debug.certificate= | ||
| codename1.version=1.0 | ||
| codename1.ios.debug.provision= | ||
| codename1.android.keystore= | ||
| codename1.icon=icon.png |
50 changes: 50 additions & 0 deletions
50
scripts/DeviceRunnerTest/src/com/mycompany/app/DeviceRunnerTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package com.mycompany.app; | ||
|
|
||
| import com.codename1.ui.Display; | ||
| import com.codename1.ui.Form; | ||
| import com.codename1.ui.Label; | ||
| import com.codename1.ui.layouts.BorderLayout; | ||
| import com.codename1.ui.util.UITimer; | ||
| import com.codename1.io.Log; | ||
| import java.io.IOException; | ||
| import com.codename1.ui.Image; | ||
| import java.io.ByteArrayOutputStream; | ||
| import com.codename1.io.Base64; | ||
|
|
||
| public class DeviceRunnerTest { | ||
|
|
||
| private Form current; | ||
|
|
||
| public void init(Object context) { | ||
| } | ||
|
|
||
| public void start() { | ||
| if (current != null) { | ||
| current.show(); | ||
| return; | ||
| } | ||
| Form hi = new Form("Hi World", new BorderLayout()); | ||
| hi.add(BorderLayout.CENTER, new Label("Hello, World!")); | ||
| hi.show(); | ||
| UITimer.timer(1000, false, () -> { | ||
| Image screenshot = Image.createImage(hi.getWidth(), hi.getHeight()); | ||
| hi.paintComponent(screenshot.getGraphics(), true); | ||
| try (ByteArrayOutputStream os = new ByteArrayOutputStream()) { | ||
| com.codename1.ui.ImageIO.getImageIO().save(screenshot, os, com.codename1.ui.Image.FORMAT_PNG, 1.0f); | ||
| System.out.println("CN1SS_BEGIN"); | ||
| System.out.println(Base64.encode(os.toByteArray())); | ||
| System.out.println("CN1SS_END"); | ||
| } catch (IOException e) { | ||
| Log.e(e); | ||
| } | ||
| Display.getInstance().exitApplication(); | ||
| }); | ||
| } | ||
|
|
||
| public void stop() { | ||
| current = Display.getInstance().getCurrent(); | ||
| } | ||
|
|
||
| public void destroy() { | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the version 7.0.41? The current version is 7.0.210 but you should be working against the locally built version.