Skip to content
Draft
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
7 changes: 7 additions & 0 deletions .github/workflows/parparvm-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ on:
pull_request:
paths:
- 'vm/**'
- 'Ports/JavaScriptPort/**'
- '!vm/**/README.md'
- '!vm/**/readme.md'
- '!vm/**/docs/**'
push:
branches: [ master, main ]
paths:
- 'vm/**'
- 'Ports/JavaScriptPort/**'
- '!vm/**/README.md'
- '!vm/**/readme.md'
- '!vm/**/docs/**'
Expand Down Expand Up @@ -79,6 +81,11 @@ jobs:
java-version: '8'
cache: 'maven'

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Run ParparVM JVM tests
working-directory: vm
run: mvn -B clean package -pl JavaAPI -am -DskipTests && mvn -B test -pl tests -am -DexcludedGroups=benchmark
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2
- name: Set up Node
if: ${{ matrix.java-version == 8 }}
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Run Unit Tests
run: |
MVN_ARGS=""
Expand Down Expand Up @@ -110,6 +115,10 @@ jobs:
- name: Run SpotBugs for ByteCodeTranslator
if: ${{ matrix.java-version == 8 }}
run: mvn -B -DskipTests=true -f vm/ByteCodeTranslator/pom.xml verify
- name: Run JavaScript Port smoke integration
if: ${{ matrix.java-version == 8 }}
working-directory: vm
run: mvn -B test -pl tests -am -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dtest=JavaScriptPortSmokeIntegrationTest
- name: Generate static analysis HTML summaries
if: ${{ always() && matrix.java-version == 8 }}
env:
Expand Down
6 changes: 6 additions & 0 deletions Ports/JavaScriptPort/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
JavaScriptPort and its dedicated fixtures are licensed under the PolyForm Noncommercial License 1.0.0.

Official license text:
[https://polyformproject.org/licenses/noncommercial/1.0.0/](https://polyformproject.org/licenses/noncommercial/1.0.0/)

This license boundary applies to files inside `Ports/JavaScriptPort/**` unless a file states otherwise.
3 changes: 3 additions & 0 deletions Ports/JavaScriptPort/NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This subtree is intentionally licensed separately from the parent Codename One repository.

Files in `Ports/JavaScriptPort/**` are licensed under PolyForm Noncommercial 1.0.0 and must not inherit the parent repository's standard source-file license headers.
12 changes: 12 additions & 0 deletions Ports/JavaScriptPort/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
JavaScriptPort is the browser-runtime work area for the new Codename One JavaScript port.

Scope of this bootstrap:
- imported HTML5/runtime code from the existing TeaVM port as the behavioral/source baseline
- PolyForm-licensed port boundary under `Ports/JavaScriptPort/**`
- ParparVM-oriented smoke fixtures under `Ports/JavaScriptPort/tests/**`
- executable translator/runtime coverage through the local ParparVM test suite in `vm/tests`

License boundary:
- `Ports/JavaScriptPort/**` is licensed under PolyForm Noncommercial 1.0.0
- dedicated smoke fixtures under `Ports/JavaScriptPort/tests/**` use the same license boundary
- the rest of the repository remains under its existing licensing
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) 2026 Codename One and contributors.
* Licensed under the PolyForm Noncommercial License 1.0.0.
* You may use this file only in compliance with that license.
* The license notice for this subtree is available in Ports/JavaScriptPort/LICENSE.md.
*/
package com.codename1.impl;

import com.codename1.impl.html5.HTML5Implementation;
import com.codename1.impl.html5.JavaScriptPortBootstrap;
import com.codename1.impl.html5.URLProxifier;
import com.codename1.ui.Display;

public class ImplementationFactory {
private static ImplementationFactory instance = new ImplementationFactory();

protected ImplementationFactory() {
}

public static ImplementationFactory getInstance() {
return instance;
}

public static void setInstance(ImplementationFactory factory) {
instance = factory;
}

public Object createImplementation() {
HTML5Implementation implementation = new HTML5Implementation();
implementation.setUrlProxifier(new URLProxifier() {
@Override
public String proxifyURL(String url) {
return JavaScriptPortBootstrap.proxifyUrl(Display.getInstance(), url);
}
});
return implementation;
}
}
Loading
Loading