Created
August 19, 2015 10:06
-
-
Save atrakeur/bfedf9c326324a426ec1 to your computer and use it in GitHub Desktop.
Bash script to convert a Java Android module to IOS with J2ObjC
This file contains 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
# Variables d'env (paths divers) | |
export APPPATH=$(pwd)/data # Le chemin vers votre module java a convertir | |
export J2OBJC=~/utils/j2objc-0.9.7 # Le chemin vers votre install de j2ObjC | |
# Convert tous les fichiers dans src/main/java | |
# Place l'export dans build/objc | |
# Ignore les fichiers commençant pas Android | |
# Cela permet de prefixer par Android/IOS les codes propres aux deux plateformes | |
cd $APPPATH | |
$J2OBJC/j2objc -use-arc -d build/objc -sourcepath src/main/java \ | |
-classpath $J2OBJC/lib/javax-inject.jar \ | |
--prefixes ../prefixes.properties \ | |
`find src/main/java -name '*.java' | grep --invert-match -i 'android'` | |
# Copie le fichier de prefixes dans le repertoire de sortie | |
cp ../prefixes.properties build/objc/ | |
# Done | |
echo ObjC files available in build/objc | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment