Skip to content

4d/android-ProjectGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProjectGenerator

Build

This project create android project using inputs from 4D Mobile App.

Requirements

  • kscript, installed for instance with sdkman or homebrew (version 4.2.2)
  • gradle to package (version 8.1)
  • java 11 or 17

Usage

Using kscript

kscript main.kt \
    generate \
    --project-editor "<path_to_json>" \
    --files-to-copy "<path_to_files_to_copy>" \
    --template-files "<path_to_template_files>" \
    --template-forms "<path_to_template_forms>" \
    --host-db "<path_to_host_database>" \
	  --catalog "<catalog-file-path"

with compiled jar replace kscript main.kt by java -jar androidprojectgenerator.jar

Deploy

This tool is mainly used by 4D Mobile App to create Android project.

To inject a custom build you must place a compiled androidprojectgenerator.jar in Resources/scripts of 4D Mobile App.

💡 By default 4D Mobile App will download the latest release on github, see _copyJarIfmissing function.

Build

./build.sh

Test using command line

You could use test.sh

configure

This test script need the 4D Mobile App component to get some templates files. You must defined the env var MOBILE_COMPONENT_PATH.

use it

./test.sh /path/to/your/4d/host/database /path/to/some/file/like/lastAndroidBuild.4dmobile

if no .4dmobile file defined, it will use the last one generated in $HOME/Library/Caches/com.4d.mobile/lastAndroidBuild.4dmobile

./test.sh /path/to/your/4d/database

then if you do not provide the database it will try to use the 4D Mobile App.4dbase (in perforce or 4D.app)

./test.sh