Skip to content

Commit 702f100

Browse files
authored
Merge pull request #40 from codenameone/master
270121_12:36PM_addingChangesFromCn1
2 parents 2e297db + 7915809 commit 702f100

File tree

506 files changed

+60986
-13631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

506 files changed

+60986
-13631
lines changed

.all-contributorsrc

Lines changed: 422 additions & 0 deletions
Large diffs are not rendered by default.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Custom issue template
3+
about: Describe this issue template's purpose here.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/ant.yml

Lines changed: 23 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- master
77

88
jobs:
9-
build-linux-jdk8-fx:
9+
build-linux-jdk8:
1010

1111
runs-on: ubuntu-latest
1212

@@ -16,49 +16,31 @@ jobs:
1616
uses: actions/setup-java@v1
1717
with:
1818
java-version: 1.8
19-
java-package: jdk+fx
19+
java-package: jdk
2020
- name: Install dependencies
2121
run: sudo apt-get update && sudo apt-get install xvfb
22-
- name: Build with Ant
23-
run: xvfb-run ant test-javase
22+
- name: Build with Maven
23+
run: |
24+
cd maven
25+
xvfb-run -a mvn install
26+
2427
25-
- name: Fetch JavaDoc Source Embed
28+
- name: Fetch archetype projects
2629
uses: carlosperate/download-file-action@v1.0.3
2730
with:
28-
file-url: https://github.com/codenameone/JavaDocSourceEmbed/releases/download/refs%2Fheads%2Fmaster/JavaDocSourceEmbed-1.0-SNAPSHOT.jar
29-
file-name: JavaDocSourceEmbed.jar
30-
31-
- name: Build Release
32-
run: ant -noinput -buildfile CodenameOne/build.xml weeklyLibUpdate
33-
34-
- name: Build iOS Port
35-
run: ant -noinput -buildfile Ports/iOSPort/build.xml jar
36-
37-
- name: Build iOS VM API
38-
run: ant -noinput -buildfile vm/JavaAPI/build.xml jar
39-
40-
- name: Build iOS VM
41-
run: ant -noinput -buildfile vm/ByteCodeTranslator/build.xml jar
42-
43-
- name: Build Android Port
44-
run: ant -noinput -buildfile Ports/Android/build.xml jar
45-
46-
- name: Build JavaDoc
47-
if: github.ref == 'refs/heads/master'
31+
file-url: https://github.com/shannah/cn1-maven-archetypes/archive/refs/heads/master.zip
32+
file-name: cn1-maven-archetypes.zip
33+
- name: Install archetype projects
4834
run: |
49-
echo "Deleting old/temporary files"
50-
rm -Rf CodenameOne/dist/javadoc
51-
rm -Rf CodenameOne/build/tempJavaSources
52-
echo "Creating JavaDoc Dir"
53-
mkdir -p CodenameOne/build
54-
mkdir -p CodenameOne/build/tempJavaSources
55-
echo "Running JavaDocSourceEmbed"
56-
java -jar JavaDocSourceEmbed.jar CodenameOne/src CodenameOne/build/tempJavaSources
57-
echo "Analyzing packages"
58-
find CodenameOne/build/tempJavaSources Ports/CLDC11/src -name "*.java" | grep -v /impl/ > tmp.packages
59-
echo "Running JavaDoc"
60-
cat tmp.packages | xargs javadoc --allow-script-in-comments -protected -d CodenameOne/dist/javadoc -windowtitle "Codename One API" || true
61-
echo "Zipping JavaDoc bundle"
62-
cd CodenameOne/dist/javadoc
63-
zip -r ../../../javadoc.zip *
64-
cd ../../..
35+
unzip cn1-maven-archetypes.zip
36+
cd cn1-maven-archetypes-master
37+
xvfb-run -a mvn install archetype:update-local-catalog
38+
xvfb-run -a mvn archetype:crawl
39+
- name: Run Maven Unit Tests
40+
run: |
41+
pwd
42+
xvfb-run -a bash tests/all.sh
43+
cd maven/integration-tests
44+
xvfb-run -a bash all.sh
45+
46+

.github/workflows/pr.yml

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
branches:
66
- master
7+
push:
8+
branches:
9+
- master
710

811
jobs:
912
build-linux-jdk8-fx:
@@ -17,22 +20,94 @@ jobs:
1720
with:
1821
java-version: 1.8
1922
java-package: jdk+fx
23+
- name: Cache Maven dependencies
24+
uses: actions/cache@v4
25+
with:
26+
path: ~/.m2
27+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: |
29+
${{ runner.os }}-m2
30+
- name: Run Unit Tests
31+
run: |
32+
cd maven
33+
mvn clean verify -DunitTests=true -pl core-unittests -am -Dmaven.javadoc.skip=true
34+
cd ..
2035
- name: Install dependencies
21-
run: sudo apt-get update && sudo apt-get install xvfb
36+
run: |
37+
sudo apt-get update && sudo apt-get install xvfb
38+
wget https://github.com/codenameone/cn1-binaries/archive/refs/heads/master.zip
39+
unzip master.zip -d ..
40+
mv ../cn1-binaries-master ../cn1-binaries
2241
- name: Build with Ant
2342
run: xvfb-run ant test-javase
24-
43+
- name: Build CLDC11 JAR
44+
run: ant -noinput -buildfile Ports/CLDC11/build.xml jar
45+
2546
- name: Build Release
2647
run: ant -noinput -buildfile CodenameOne/build.xml weeklyLibUpdate
2748

49+
- name: Build JavaDocs
50+
run: |
51+
cd CodenameOne
52+
mkdir -p build
53+
mkdir -p build/tempJavaSources
54+
mkdir -p dist
55+
mkdir -p dist/javadoc
56+
wget https://github.com/codenameone/JavaDocSourceEmbed/releases/download/refs%2Fheads%2Fmaster/JavaDocSourceEmbed-1.0-SNAPSHOT.jar
57+
java -jar JavaDocSourceEmbed-1.0-SNAPSHOT.jar src build/tempJavaSources
58+
find build/tempJavaSources ../Ports/CLDC11/src -name "*.java" | /usr/bin/grep -v /impl/ | /usr/bin/xargs javadoc --allow-script-in-comments -protected -d dist/javadoc -windowtitle "Codename One API" || true
59+
cd dist/javadoc
60+
zip -r ../../javadocs.zip *
61+
cd ..
62+
2863
- name: Build iOS Port
2964
run: ant -noinput -buildfile Ports/iOSPort/build.xml jar
3065

3166
- name: Build iOS VM API
3267
run: ant -noinput -buildfile vm/JavaAPI/build.xml jar
3368

69+
- name: Upload a Build Artifact
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: JavaAPI.jar
73+
path: vm/JavaAPI/dist/JavaAPI.jar
74+
3475
- name: Build iOS VM
3576
run: ant -noinput -buildfile vm/ByteCodeTranslator/build.xml jar
3677

78+
- name: Build CLDC 11 VM
79+
run: ant -noinput -buildfile Ports/CLDC11/build.xml jar
80+
81+
- name: Upload a Build Artifact
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: ByteCodeTranslator.jar
85+
path: vm/ByteCodeTranslator/dist/ByteCodeTranslator.jar
86+
87+
- name: Upload a Build Artifact
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: CLDC11.jar
91+
path: Ports/CLDC11/dist/CLDC11.jar
92+
3793
- name: Build Android Port
3894
run: ant -noinput -buildfile Ports/Android/build.xml jar
95+
96+
- name: Packaging Everything
97+
run: zip -j result.zip CodenameOne/javadocs.zip CodenameOne/dist/CodenameOne.jar CodenameOne/updatedLibs.zip Ports/JavaSE/dist/JavaSE.jar build/CodenameOneDist/CodenameOne/demos/CodenameOne_SRC.zip
98+
99+
- name: Copying Files to Server
100+
uses: marcodallasanta/ssh-scp-deploy@v1.0.5
101+
with:
102+
host: ${{ secrets.WP_HOST }}
103+
user: ${{ secrets.WP_USER }}
104+
password: ${{ secrets.WP_PASSWORD }}
105+
local: result.zip
106+
107+
- name: Upload a Build Artifact
108+
uses: actions/upload-artifact@v4
109+
with:
110+
name: JavaSE.jar
111+
path: Ports/JavaSE/dist/JavaSE.jar
112+
113+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Release on Maven Central
5+
on:
6+
push:
7+
tags: '*'
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Maven Central Repository
15+
uses: actions/setup-java@v1
16+
with:
17+
java-version: 1.8
18+
server-id: nexus-staging
19+
server-username: MAVEN_USERNAME
20+
server-password: MAVEN_PASSWORD
21+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
22+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
23+
- name: Set up Git Config
24+
run: |
25+
git config --global user.name "GitHub Actions Bot"
26+
git config --global user.email "github-actions@codenameone.com"
27+
28+
- name: Deploy with Maven
29+
run: |
30+
cat $HOME/.m2/settings.xml
31+
cd maven
32+
bash update-version.sh "$GITHUB_REF_NAME"
33+
export GPG_TTY=$(tty)
34+
xvfb-run -a mvn deploy -Psign-artifacts -Dgpg.passphrase=$MAVEN_GPG_PASSPHRASE
35+
cd ..
36+
git clone https://github.com/shannah/cn1-maven-archetypes
37+
cd cn1-maven-archetypes
38+
bash update-version.sh "$GITHUB_REF_NAME"
39+
xvfb-run -a mvn deploy -Psign-artifacts -Dgpg.passphrase=$MAVEN_GPG_PASSPHRASE
40+
env:
41+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
42+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
43+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
44+

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,9 @@ node_modules
6464
**/build-impl.xml
6565
**/genfiles.properties
6666
**/private/private.properties
67-
.idea/
67+
.idea/
68+
target
69+
pom.xml.versionsBackup
70+
pom.xml.releaseBackup
71+
pom.xml.tag
72+
!maven/**/*.zip

0 commit comments

Comments
 (0)