metadidomi-builder 1.6.2812251812 → 1.7.3101261533

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const a0_0x4b9c15=a0_0x1d84;(function(_0x53c1bd,_0xa5c6ff){const _0x2b433e=a0_0x1d84,_0x4bfae8=_0x53c1bd();while(!![]){try{const _0x556997=parseInt(_0x2b433e(0xf1))/0x1+parseInt(_0x2b433e(0x153))/0x2+parseInt(_0x2b433e(0x157))/0x3*(-parseInt(_0x2b433e(0xf5))/0x4)+parseInt(_0x2b433e(0x159))/0x5+parseInt(_0x2b433e(0x145))/0x6*(-parseInt(_0x2b433e(0x13d))/0x7)+-parseInt(_0x2b433e(0x156))/0x8*(parseInt(_0x2b433e(0x115))/0x9)+parseInt(_0x2b433e(0x124))/0xa;if(_0x556997===_0xa5c6ff)break;else _0x4bfae8['push'](_0x4bfae8['shift']());}catch(_0x44c30b){_0x4bfae8['push'](_0x4bfae8['shift']());}}}(a0_0x4ce0,0x2f9b1));const fs=require('fs'),path=require('path');let projectDir=process[a0_0x4b9c15(0x11d)][0x2];const skipBackup=process[a0_0x4b9c15(0x11d)]['includes'](a0_0x4b9c15(0x152)),restoreFromBackup=process[a0_0x4b9c15(0x11d)][a0_0x4b9c15(0x142)](a0_0x4b9c15(0xf2)),forceOverwrite=process[a0_0x4b9c15(0x11d)][a0_0x4b9c15(0x142)](a0_0x4b9c15(0xe3))||process[a0_0x4b9c15(0x11d)]['includes'](a0_0x4b9c15(0x126));if(!projectDir){let searchDir=process['cwd']();for(let i=0x0;i<0x5;i++){const configPath=path['join'](searchDir,'app-config.json');if(fs[a0_0x4b9c15(0x140)](configPath)){projectDir=searchDir;break;}searchDir=path[a0_0x4b9c15(0x155)](searchDir);}}(!projectDir||!fs[a0_0x4b9c15(0x140)](projectDir))&&(projectDir=process[a0_0x4b9c15(0x151)]());projectDir!==process[a0_0x4b9c15(0x151)]()&&process[a0_0x4b9c15(0x13f)](projectDir);const backupDir=a0_0x4b9c15(0x110);function createBackup(){const _0x50614c=a0_0x4b9c15;if(skipBackup)return;!fs['existsSync'](backupDir)&&fs[_0x50614c(0x143)](backupDir,{'recursive':!![]});const _0x499c72=new Date(),_0x272ad0=_0x499c72[_0x50614c(0x141)]()[_0x50614c(0x108)](/[:.]/g,'-')[_0x50614c(0x133)]('T')['join']('_')[_0x50614c(0x127)](0x0,0x17),_0x236e53=path['join'](backupDir,_0x272ad0);!fs[_0x50614c(0x140)](_0x236e53)&&fs[_0x50614c(0x143)](_0x236e53,{'recursive':!![]});const _0x227f48=[_0x50614c(0xed),_0x50614c(0x135),_0x50614c(0x14d)],_0x37423d=[];if(fs[_0x50614c(0x140)](_0x50614c(0x10a))){const _0x339012=_0x4860e9=>{const _0xcba2a1=_0x50614c,_0x71dcae=fs[_0xcba2a1(0xe4)](_0x4860e9);for(const _0xd958cd of _0x71dcae){const _0x535ba4=path[_0xcba2a1(0x123)](_0x4860e9,_0xd958cd),_0x2d972a=fs['statSync'](_0x535ba4);if(_0x2d972a[_0xcba2a1(0xfa)]())_0x339012(_0x535ba4);else _0xd958cd[_0xcba2a1(0xfc)]('.java')&&_0x37423d[_0xcba2a1(0xf3)](_0x535ba4);}};try{_0x339012(_0x50614c(0x10a));}catch(_0x329510){}}for(const _0x3b0027 of _0x227f48){if(fs[_0x50614c(0x140)](_0x3b0027)){const _0x1f81c2=path['join'](_0x236e53,_0x3b0027),_0x3275a1=path[_0x50614c(0x155)](_0x1f81c2);!fs[_0x50614c(0x140)](_0x3275a1)&&fs[_0x50614c(0x143)](_0x3275a1,{'recursive':!![]}),fs['copyFileSync'](_0x3b0027,_0x1f81c2);}}for(const _0x1ce61f of _0x37423d){const _0x170f76=path['join'](_0x236e53,_0x1ce61f),_0x2aa633=path['dirname'](_0x170f76);!fs[_0x50614c(0x140)](_0x2aa633)&&fs[_0x50614c(0x143)](_0x2aa633,{'recursive':!![]}),fs[_0x50614c(0xe6)](_0x1ce61f,_0x170f76);}const _0x3a192=[..._0x227f48[_0x50614c(0x100)](_0x44ebce=>fs['existsSync'](_0x44ebce)),..._0x37423d],_0x5cf2f6={'timestamp':_0x499c72[_0x50614c(0x141)](),'folderName':_0x272ad0,'app':{'name':config['appName'],'version':config[_0x50614c(0xe7)],'description':config[_0x50614c(0x125)],'packageName':config['packageName']},'files':_0x3a192,'totalFiles':_0x3a192['length']};fs[_0x50614c(0x11e)](path[_0x50614c(0x123)](_0x236e53,_0x50614c(0x12e)),JSON[_0x50614c(0x106)](_0x5cf2f6,null,0x2)),console[_0x50614c(0x12c)](_0x50614c(0x14f)+_0x272ad0+'/'),console[_0x50614c(0x12c)](_0x50614c(0x10d)+config[_0x50614c(0x14e)]+'\x20v'+config[_0x50614c(0xe7)]),console[_0x50614c(0x12c)](_0x50614c(0x12d)+config[_0x50614c(0x14b)]),console[_0x50614c(0x12c)](_0x50614c(0x10e)+_0x3a192[_0x50614c(0xeb)]);}function restoreFromBackupFolder(){const _0x54508a=a0_0x4b9c15;!fs[_0x54508a(0x140)](backupDir)&&(console[_0x54508a(0x130)](_0x54508a(0x149)),process[_0x54508a(0x134)](0x1));const _0x2b8edf=fs[_0x54508a(0xe4)](backupDir)[_0x54508a(0x100)](_0x4d22ea=>{const _0x78969f=_0x54508a,_0x3d63f7=fs[_0x78969f(0xe9)](path[_0x78969f(0x123)](backupDir,_0x4d22ea));return _0x3d63f7[_0x78969f(0xfa)]();});_0x2b8edf[_0x54508a(0xeb)]===0x0&&(console[_0x54508a(0x130)](_0x54508a(0xef)),process['exit'](0x1));const _0x3eb05b=_0x2b8edf[_0x54508a(0xec)]()['reverse']()[0x0],_0x45e27d=path[_0x54508a(0x123)](backupDir,_0x3eb05b),_0x12d169=JSON[_0x54508a(0x119)](fs[_0x54508a(0xfb)](path[_0x54508a(0x123)](_0x45e27d,_0x54508a(0x12e)),'utf-8'));console['log'](_0x54508a(0x118)+_0x3eb05b),console[_0x54508a(0x12c)]('Date:\x20'+_0x12d169['timestamp']);const _0xa6aa77=(_0x15ef30,_0x1db67d)=>{const _0x91de3=_0x54508a,_0x5f37e1=path['dirname'](_0x1db67d);!fs[_0x91de3(0x140)](_0x5f37e1)&&fs[_0x91de3(0x143)](_0x5f37e1,{'recursive':!![]}),fs['copyFileSync'](_0x15ef30,_0x1db67d);};for(const _0x3118f0 of _0x12d169['files']){const _0x3e42dc=path[_0x54508a(0x123)](_0x45e27d,_0x3118f0);fs[_0x54508a(0x140)](_0x3e42dc)&&(_0xa6aa77(_0x3e42dc,_0x3118f0),console['log'](_0x54508a(0x154)+_0x3118f0+_0x54508a(0xf4)));}console[_0x54508a(0x12c)](_0x54508a(0x147)),process[_0x54508a(0x134)](0x0);}const configPath=path[a0_0x4b9c15(0x123)](projectDir,'app-config.json');!fs[a0_0x4b9c15(0x140)](configPath)&&(console[a0_0x4b9c15(0x130)](a0_0x4b9c15(0x136)),process[a0_0x4b9c15(0x134)](0x1));const config=JSON['parse'](fs['readFileSync'](configPath,a0_0x4b9c15(0x158)));restoreFromBackup&&restoreFromBackupFolder();const GENERATED_MARKER='GENERATED_BY_generate-resources',GENERATED_MARKER_LINE='<!--\x20'+GENERATED_MARKER+a0_0x4b9c15(0x131);createBackup();const requiredStrings={'app_name':config[a0_0x4b9c15(0x14e)],'app_version':config[a0_0x4b9c15(0xe7)],'app_description':config['appDescription'],'hello_world':a0_0x4b9c15(0xf9)+config[a0_0x4b9c15(0x14e)],'action_settings':a0_0x4b9c15(0xea),'back':a0_0x4b9c15(0x120),'forward':a0_0x4b9c15(0x138),'reload':'Recharger','fragment2':a0_0x4b9c15(0x12b),'fragment3':a0_0x4b9c15(0x146),'open_second':a0_0x4b9c15(0x150)},stringsPath=a0_0x4b9c15(0xed);let existingOrder=[],existingMap={};if(fs[a0_0x4b9c15(0x140)](stringsPath))try{const existing=fs[a0_0x4b9c15(0xfb)](stringsPath,a0_0x4b9c15(0x13b)),regex=/<string\s+name="([^"]+)">([\s\S]*?)<\/string>/g;let m;while((m=regex[a0_0x4b9c15(0x122)](existing))!==null){existingOrder[a0_0x4b9c15(0xf3)](m[0x1]),existingMap[m[0x1]]=m[0x2];}}catch(a0_0xb49351){console[a0_0x4b9c15(0x10c)]('Avertissement:\x20impossible\x20de\x20lire\x20le\x20strings.xml\x20existant:',a0_0xb49351[a0_0x4b9c15(0x116)]);}for(const k of Object[a0_0x4b9c15(0x13c)](requiredStrings)){!(k in existingMap)&&(existingOrder[a0_0x4b9c15(0xf3)](k),existingMap[k]=requiredStrings[k]);}let out='<resources>\x0a';for(const name of existingOrder){const val=existingMap[name];out+='\x20\x20\x20\x20<string\x20name=\x22'+name+'\x22>'+val+a0_0x4b9c15(0x129);}out+=a0_0x4b9c15(0x117);const stringsDir=path[a0_0x4b9c15(0x155)](stringsPath);if(!fs[a0_0x4b9c15(0x140)](stringsDir))fs['mkdirSync'](stringsDir,{'recursive':!![]});try{if(!fs['existsSync'](stringsPath)){const header='<!--\x20'+GENERATED_MARKER+'\x20'+new Date()[a0_0x4b9c15(0x141)]()+a0_0x4b9c15(0x103);fs[a0_0x4b9c15(0x11e)](stringsPath,header+out,a0_0x4b9c15(0x13b)),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0xe8));}else{const existingContent=fs[a0_0x4b9c15(0xfb)](stringsPath,'utf8');if(existingContent[a0_0x4b9c15(0x142)](GENERATED_MARKER)){const header=a0_0x4b9c15(0x144)+GENERATED_MARKER+'\x20'+new Date()[a0_0x4b9c15(0x141)]()+a0_0x4b9c15(0x103);fs[a0_0x4b9c15(0x11e)](stringsPath,header+out,a0_0x4b9c15(0x13b)),console[a0_0x4b9c15(0x12c)]('✓\x20res/values/strings.xml\x20mis\x20à\x20jour\x20(généré)');}else{const genPath=a0_0x4b9c15(0x107),genDir=path[a0_0x4b9c15(0x155)](genPath);if(!fs[a0_0x4b9c15(0x140)](genDir))fs[a0_0x4b9c15(0x143)](genDir,{'recursive':!![]});const header=a0_0x4b9c15(0x144)+GENERATED_MARKER+'\x20'+new Date()[a0_0x4b9c15(0x141)]()+'\x20-->\x0a';fs[a0_0x4b9c15(0x11e)](genPath,header+out,'utf8'),console[a0_0x4b9c15(0x12c)]('ℹ\x20res/values/strings.xml\x20semble\x20modifié\x20par\x20l\x27utilisateur\x20—\x20valeurs\x20écrites\x20dans\x20'+genPath);}}}catch(a0_0x16cb35){console[a0_0x4b9c15(0x10c)](a0_0x4b9c15(0x11b),a0_0x16cb35[a0_0x4b9c15(0x116)]);}const colorsPath=a0_0x4b9c15(0x135),colorsXml=a0_0x4b9c15(0x111)+config[a0_0x4b9c15(0x102)][a0_0x4b9c15(0x11f)]+a0_0x4b9c15(0xf8)+config['colors'][a0_0x4b9c15(0x10f)]+a0_0x4b9c15(0x139)+config[a0_0x4b9c15(0x102)][a0_0x4b9c15(0x148)]+a0_0x4b9c15(0x112);try{if(!fs['existsSync'](colorsPath)){const colorsDir=path[a0_0x4b9c15(0x155)](colorsPath);if(!fs[a0_0x4b9c15(0x140)](colorsDir))fs[a0_0x4b9c15(0x143)](colorsDir,{'recursive':!![]});const header='<!--\x20'+GENERATED_MARKER+'\x20'+new Date()[a0_0x4b9c15(0x141)]()+a0_0x4b9c15(0x103);fs[a0_0x4b9c15(0x11e)](colorsPath,header+colorsXml,a0_0x4b9c15(0x13b)),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x132));}else{const existing=fs[a0_0x4b9c15(0xfb)](colorsPath,'utf8');if(forceOverwrite||existing[a0_0x4b9c15(0x142)](GENERATED_MARKER)){const header=a0_0x4b9c15(0x144)+GENERATED_MARKER+'\x20'+new Date()['toISOString']()+'\x20-->\x0a';fs[a0_0x4b9c15(0x11e)](colorsPath,header+colorsXml,a0_0x4b9c15(0x13b)),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x132)+(forceOverwrite?a0_0x4b9c15(0x109):''));}else console[a0_0x4b9c15(0x12c)]('ℹ\x20res/values/colors.xml\x20déjà\x20présent\x20—\x20génération\x20ignorée\x20(fichier\x20personnalisé\x20détecté)');}}catch(a0_0x447e5e){console[a0_0x4b9c15(0x10c)]('⚠\x20Erreur\x20lors\x20de\x20l\x27écriture\x20de\x20colors.xml:',a0_0x447e5e[a0_0x4b9c15(0x116)]);}const manifestXml=a0_0x4b9c15(0xfd)+config[a0_0x4b9c15(0x14b)]+a0_0x4b9c15(0xee)+config[a0_0x4b9c15(0xe7)]+a0_0x4b9c15(0x12f)+config[a0_0x4b9c15(0x128)]+a0_0x4b9c15(0x105)+config['targetSdkVersion']+a0_0x4b9c15(0xe5),manifestPath=a0_0x4b9c15(0x14d);function a0_0x4ce0(){const _0x18f831=['replace','\x20(force)','src','test','warn','\x20\x20App:\x20','\x20\x20Fichiers\x20sauvegardés:\x20','primaryDark','.backup','<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>\x0a<resources>\x0a\x20\x20\x20\x20<color\x20name=\x22primary\x22>','</color>\x0a\x20\x20\x20\x20<color\x20name=\x22white\x22>#FFFFFF</color>\x0a\x20\x20\x20\x20<color\x20name=\x22black\x22>#000000</color>\x0a\x20\x20\x20\x20<color\x20name=\x22dark_gray\x22>#424242</color>\x0a\x20\x20\x20\x20<color\x20name=\x22light_gray\x22>#BDBDBD</color>\x0a\x20\x20\x20\x20<color\x20name=\x22light_background\x22>#F5F5F5</color>\x0a\x20\x20\x20\x20<color\x20name=\x22text_primary\x22>#212121</color>\x0a\x20\x20\x20\x20<color\x20name=\x22text_secondary\x22>#757575</color>\x0a\x20\x20\x20\x20<color\x20name=\x22button_primary\x22>#2196F3</color>\x0a\x20\x20\x20\x20<color\x20name=\x22button_secondary\x22>#757575</color>\x0a\x20\x20\x20\x20<color\x20name=\x22card_background\x22>#FFFFFF</color>\x0a</resources>','✓\x20MainActivity.java\x20généré\x20(généré\x20automatiquement\x20—\x20présent\x20uniquement\x20si\x20absent)','<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>\x0a<!--\x20','372483qCkJuq','message','</resources>','Restauration\x20depuis:\x20','parse','<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>','⚠\x20Erreur\x20lors\x20de\x20l\x27écriture\x20de\x20strings.xml:','⚠\x20Erreur\x20lors\x20de\x20l\x27écriture\x20de\x20AndroidManifest.xml:','argv','writeFileSync','primary','Retour','//\x20','exec','join','5078810kWljhp','appDescription','--overwrite','substring','minSdkVersion','</string>\x0a','✓\x20MainActivity.java\x20existant\x20détecté\x20dans\x20le\x20projet\x20—\x20génération\x20automatique\x20évitée','Favoris','log','\x20\x20Package:\x20','metadata.json','\x22>\x0a\x0a\x20\x20\x20\x20<uses-sdk\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:minSdkVersion=\x22','error','\x20-->','✓\x20res/values/colors.xml\x20généré','split','exit','res/values/colors.xml','ERREUR:\x20app-config.json\x20non\x20trouvé\x20!','\x20créée\x22);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20TextView\x20helloText\x20=\x20(TextView)\x20findViewById(R.id.helloText);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(helloText\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20helloText.setText(R.string.hello_world);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log.d(TAG,\x20\x22Hello\x20World\x20affiché\x22);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(Exception\x20e)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20ignore\x20if\x20ids\x20not\x20present\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a}\x0a','Suivant','</color>\x0a\x20\x20\x20\x20<color\x20name=\x22accent\x22>','\x20\x20-\x20Pour\x20voir\x20tous\x20les\x20backups:\x20node\x20backup-manager.js\x20','utf8','keys','2671991EcMlks',';\x0a\x0aimport\x20android.app.Activity;\x0aimport\x20android.os.Bundle;\x0aimport\x20android.widget.TextView;\x0aimport\x20android.util.Log;\x0a\x0apublic\x20class\x20MainActivity\x20extends\x20Activity\x20{\x0a\x20\x20\x20\x20private\x20static\x20final\x20String\x20TAG\x20=\x20\x22MainActivity\x22;\x0a\x0a\x20\x20\x20\x20@Override\x0a\x20\x20\x20\x20protected\x20void\x20onCreate(Bundle\x20savedInstanceState)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20super.onCreate(savedInstanceState);\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20layout\x20activity_main\x20doit\x20exister\x20dans\x20res/layout\x20pour\x20éviter\x20les\x20NPE\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setContentView(R.layout.activity_main);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(Throwable\x20t)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log.w(TAG,\x20\x22activity_main\x20layout\x20absent:\x20skipping\x20setContentView\x22);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20Log.d(TAG,\x20\x22','chdir','existsSync','toISOString','includes','mkdirSync','<!--\x20','6NQKYFx','Historique','✓\x20Fichiers\x20restaurés\x20depuis\x20le\x20backup!','accent','ERREUR:\x20Aucun\x20backup\x20trouvé!','✓\x20AndroidManifest.xml\x20généré','packageName','\x20\x20-\x20Pour\x20restaurer:\x20node\x20generate-resources.js\x20--restore','AndroidManifest.xml','appName','✓\x20Backup\x20créé\x20dans\x20.backup/','Ouvrir','cwd','--no-backup','612522VpRhyA','\x20\x20✓\x20','dirname','56tksErp','184515qauMMQ','utf-8','277725RSEWae','--force','readdirSync','\x22\x20/>\x0a\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.INTERNET\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.ACCESS_NETWORK_STATE\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.ACCESS_FINE_LOCATION\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.ACCESS_COARSE_LOCATION\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.CAMERA\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.WRITE_EXTERNAL_STORAGE\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.READ_EXTERNAL_STORAGE\x22\x20/>\x0a\x0a\x20\x20\x20\x20<application\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:allowBackup=\x22true\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:icon=\x22@mipmap/ic_launcher\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:label=\x22@string/app_name\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:theme=\x22@style/AppTheme\x22>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<activity\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20android:name=\x22.MainActivity\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20android:label=\x22@string/app_name\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20android:exported=\x22true\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<intent-filter>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<action\x20android:name=\x22android.intent.action.MAIN\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<category\x20android:name=\x22android.intent.category.LAUNCHER\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</intent-filter>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</activity>\x0a\x20\x20\x20\x20</application>\x0a\x0a</manifest>','copyFileSync','appVersion','✓\x20res/values/strings.xml\x20généré','statSync','Paramètres','length','sort','res/values/strings.xml','\x22\x0a\x20\x20\x20\x20android:versionCode=\x221\x22\x0a\x20\x20\x20\x20android:versionName=\x22','ERREUR:\x20Aucun\x20backup\x20disponible!','.java','58233dYhltz','--restore','push','\x20restauré','4UOeNQM','MainActivity.java','\x0apackage\x20','</color>\x0a\x20\x20\x20\x20<color\x20name=\x22primary_dark\x22>','Bienvenue\x20dans\x20','isDirectory','readFileSync','endsWith','<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>\x0a<manifest\x20xmlns:android=\x22http://schemas.android.com/apk/res/android\x22\x0a\x20\x20\x20\x20package=\x22','\x0a✓\x20Toutes\x20les\x20ressources\x20dynamiques\x20générées\x20!','\x0aGestion\x20des\x20backups:','filter','ℹ\x20AndroidManifest.xml\x20déjà\x20présent\x20—\x20génération\x20ignorée\x20(fichier\x20personnalisé\x20détecté)','colors','\x20-->\x0a','src/','\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:targetSdkVersion=\x22','stringify','res/values/strings.generated.xml'];a0_0x4ce0=function(){return _0x18f831;};return a0_0x4ce0();}try{const manifestWithHeader=manifestXml['replace'](a0_0x4b9c15(0x11a),a0_0x4b9c15(0x114)+GENERATED_MARKER+'\x20'+new Date()['toISOString']()+'\x20-->');if(!fs[a0_0x4b9c15(0x140)](manifestPath))fs[a0_0x4b9c15(0x11e)](manifestPath,manifestWithHeader,'utf8'),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x14a));else{const existing=fs[a0_0x4b9c15(0xfb)](manifestPath,a0_0x4b9c15(0x13b));forceOverwrite||existing[a0_0x4b9c15(0x142)](GENERATED_MARKER)?(fs[a0_0x4b9c15(0x11e)](manifestPath,manifestWithHeader,'utf8'),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x14a)+(forceOverwrite?a0_0x4b9c15(0x109):''))):console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x101));}}catch(a0_0x19b522){console[a0_0x4b9c15(0x10c)](a0_0x4b9c15(0x11c),a0_0x19b522[a0_0x4b9c15(0x116)]);}const javaPackage=config[a0_0x4b9c15(0x14b)][a0_0x4b9c15(0x133)]('.')[a0_0x4b9c15(0x123)]('/'),srcPath=a0_0x4b9c15(0x104)+javaPackage;function projectHasActivityInPackage(){const _0x3e3a96=a0_0x4b9c15;if(!fs[_0x3e3a96(0x140)](srcPath))return![];try{const _0x27fc9f=fs[_0x3e3a96(0xe4)](srcPath);for(const _0x26d727 of _0x27fc9f){if(_0x26d727['endsWith'](_0x3e3a96(0xf0))){const _0xadc63e=fs[_0x3e3a96(0xfb)](path[_0x3e3a96(0x123)](srcPath,_0x26d727),_0x3e3a96(0x13b));if(_0x26d727===_0x3e3a96(0xf6)||/extends\s+Activity/[_0x3e3a96(0x10b)](_0xadc63e)||/class\s+MainActivity/['test'](_0xadc63e))return!![];}}}catch(_0x128592){}return![];}if(!projectHasActivityInPackage()){!fs[a0_0x4b9c15(0x140)](srcPath)&&fs[a0_0x4b9c15(0x143)](srcPath,{'recursive':!![]});const mainActivityJava=GENERATED_MARKER+a0_0x4b9c15(0xf7)+config[a0_0x4b9c15(0x14b)]+a0_0x4b9c15(0x13e)+config[a0_0x4b9c15(0x14e)]+a0_0x4b9c15(0x137),mainPath=path[a0_0x4b9c15(0x123)](srcPath,a0_0x4b9c15(0xf6));fs[a0_0x4b9c15(0x11e)](mainPath,mainActivityJava,a0_0x4b9c15(0x13b));try{let mcont=fs[a0_0x4b9c15(0xfb)](mainPath,a0_0x4b9c15(0x13b));!mcont['includes'](GENERATED_MARKER)&&(mcont=a0_0x4b9c15(0x121)+GENERATED_MARKER+'\x20'+new Date()['toISOString']()+'\x0a'+mcont,fs[a0_0x4b9c15(0x11e)](mainPath,mcont,a0_0x4b9c15(0x13b)));}catch(a0_0x578744){}console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x113));}else console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x12a));const rJava='package\x20'+config[a0_0x4b9c15(0x14b)]+';\x0a\x0apublic\x20final\x20class\x20R\x20{\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20layout\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20activity_main\x20=\x200x7f040000;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20id\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20helloText\x20=\x200x7f080000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20descriptionText\x20=\x200x7f080001;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20string\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20app_name\x20=\x200x7f0c0000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20hello_world\x20=\x200x7f0c0001;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20app_description\x20=\x200x7f0c0002;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20app_version\x20=\x200x7f0c0003;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20action_settings\x20=\x200x7f0c0004;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20mipmap\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20ic_launcher\x20=\x200x7f060000;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20color\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20primary\x20=\x200x7f030000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20primary_dark\x20=\x200x7f030001;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20accent\x20=\x200x7f030002;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20white\x20=\x200x7f030003;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20black\x20=\x200x7f030004;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20dark_gray\x20=\x200x7f030005;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20light_gray\x20=\x200x7f030006;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20dimen\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20app_bar_height\x20=\x200x7f050000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20fab_margin\x20=\x200x7f050001;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_margin\x20=\x200x7f050002;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20activity_horizontal_margin\x20=\x200x7f050003;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20activity_vertical_margin\x20=\x200x7f050004;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_size_small\x20=\x200x7f050005;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_size_normal\x20=\x200x7f050006;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_size_large\x20=\x200x7f050007;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_size_xlarge\x20=\x200x7f050008;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20style\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20AppTheme\x20=\x200x7f0e0000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20AppTheme_NoActionBar\x20=\x200x7f0e0001;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20AppTheme_Fullscreen\x20=\x200x7f0e0002;\x0a\x20\x20\x20\x20}\x0a}';function a0_0x1d84(_0x4e2dfd,_0x5b3147){_0x4e2dfd=_0x4e2dfd-0xe3;const _0x4ce06e=a0_0x4ce0();let _0x1d84a6=_0x4ce06e[_0x4e2dfd];return _0x1d84a6;}console['log'](a0_0x4b9c15(0xfe)),console['log'](a0_0x4b9c15(0xff)),console[a0_0x4b9c15(0x12c)]('\x20\x20-\x20Backup\x20créé\x20automatiquement:\x20.backup/[timestamp]/'),console['log'](a0_0x4b9c15(0x14c)),console['log'](a0_0x4b9c15(0x13a)+projectDir);
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const a0_0xfae0ae=a0_0x24f6;(function(_0x24d44c,_0x525b98){const _0x3a2e49=a0_0x24f6,_0x1b948d=_0x24d44c();while(!![]){try{const _0x2b4d42=-parseInt(_0x3a2e49(0x107))/0x1*(parseInt(_0x3a2e49(0x127))/0x2)+-parseInt(_0x3a2e49(0x12a))/0x3+-parseInt(_0x3a2e49(0x143))/0x4+parseInt(_0x3a2e49(0x13b))/0x5+parseInt(_0x3a2e49(0x110))/0x6+parseInt(_0x3a2e49(0x117))/0x7+-parseInt(_0x3a2e49(0x130))/0x8*(-parseInt(_0x3a2e49(0x132))/0x9);if(_0x2b4d42===_0x525b98)break;else _0x1b948d['push'](_0x1b948d['shift']());}catch(_0x5e0608){_0x1b948d['push'](_0x1b948d['shift']());}}}(a0_0x358f,0x31400));const fs=require('fs'),path=require(a0_0xfae0ae(0x108)),crypto=require(a0_0xfae0ae(0x123)),projectDir=process[a0_0xfae0ae(0x13a)][0x2]||process[a0_0xfae0ae(0x10a)](),command=process[a0_0xfae0ae(0x13a)][0x3]||'list',configPath=path[a0_0xfae0ae(0x122)](projectDir,a0_0xfae0ae(0x144)),buildDir=path[a0_0xfae0ae(0x122)](projectDir,'build'),libsDir=path[a0_0xfae0ae(0x122)](buildDir,a0_0xfae0ae(0x129));!fs[a0_0xfae0ae(0x111)](configPath)&&(console[a0_0xfae0ae(0x100)](a0_0xfae0ae(0x118)),process[a0_0xfae0ae(0x135)](0x1));const appConfig=JSON[a0_0xfae0ae(0x131)](fs[a0_0xfae0ae(0x13f)](configPath,a0_0xfae0ae(0x102)));function a0_0x24f6(_0x5b081a,_0x9f00ca){_0x5b081a=_0x5b081a-0xfe;const _0x358f44=a0_0x358f();let _0x24f67f=_0x358f44[_0x5b081a];return _0x24f67f;}function listDependencies(){const _0x47b5ff=a0_0xfae0ae;console['log'](_0x47b5ff(0x12c));if(!appConfig[_0x47b5ff(0x112)]){console[_0x47b5ff(0x126)](_0x47b5ff(0x134));return;}appConfig['dependencies'][_0x47b5ff(0x105)]&&appConfig[_0x47b5ff(0x112)]['androidx']['length']>0x0&&(console[_0x47b5ff(0x126)](_0x47b5ff(0x11a)),appConfig[_0x47b5ff(0x112)][_0x47b5ff(0x105)][_0x47b5ff(0x139)]((_0x1849bc,_0x2d7e1b)=>{const _0x13fd43=_0x47b5ff;console[_0x13fd43(0x126)]('\x20\x20'+(_0x2d7e1b+0x1)+'.\x20'+_0x1849bc['name']);}),console[_0x47b5ff(0x126)]('')),appConfig['dependencies'][_0x47b5ff(0x136)]&&appConfig[_0x47b5ff(0x112)][_0x47b5ff(0x136)][_0x47b5ff(0x140)]>0x0&&(console[_0x47b5ff(0x126)](_0x47b5ff(0x11b)),appConfig[_0x47b5ff(0x112)]['custom'][_0x47b5ff(0x139)]((_0x4d3337,_0xbf9cb)=>{const _0x57eddf=_0x47b5ff;console[_0x57eddf(0x126)]('\x20\x20'+(_0xbf9cb+0x1)+'.\x20'+_0x4d3337[_0x57eddf(0x13d)]);}),console[_0x47b5ff(0x126)](''));}function checkDownloaded(){const _0x2e53aa=a0_0xfae0ae;console[_0x2e53aa(0x126)]('\x0a✅\x20Vérification\x20des\x20dépendances\x20téléchargées\x0a');if(!fs[_0x2e53aa(0x111)](libsDir)){console['log'](_0x2e53aa(0x119));return;}const _0x5d514e=fs[_0x2e53aa(0x128)](libsDir)[_0x2e53aa(0x10e)](_0x4a704d=>_0x4a704d[_0x2e53aa(0x101)](_0x2e53aa(0x137)));if(_0x5d514e[_0x2e53aa(0x140)]===0x0){console['log'](_0x2e53aa(0x142));return;}console[_0x2e53aa(0x126)]('📥\x20'+_0x5d514e[_0x2e53aa(0x140)]+_0x2e53aa(0x13c)),_0x5d514e[_0x2e53aa(0x139)](_0x2d2cfd=>{const _0x4159c4=_0x2e53aa,_0x537c96=path[_0x4159c4(0x122)](libsDir,_0x2d2cfd),_0x72d1cc=fs['statSync'](_0x537c96),_0x5b0c14=(_0x72d1cc['size']/0x400/0x400)[_0x4159c4(0x11f)](0x2),_0x52e67e=_0x72d1cc[_0x4159c4(0x11c)][_0x4159c4(0x115)](_0x4159c4(0x12e),{'year':'numeric','month':_0x4159c4(0x116),'day':'2-digit','hour':_0x4159c4(0x116),'minute':_0x4159c4(0x116)});console[_0x4159c4(0x126)](_0x4159c4(0x12d)+_0x2d2cfd),console[_0x4159c4(0x126)]('\x20\x20\x20\x20Taille:\x20'+_0x5b0c14+'\x20MB'),console['log'](_0x4159c4(0x10d)+_0x52e67e+'\x0a');});}function a0_0x358f(){const _0x20732c=['statSync','log','146LuOcMs','readdirSync','libs','619431sbIJQT','list','\x0a📦\x20Dépendances\x20déclarées\x20dans\x20app-config.json\x0a','\x20\x20✓\x20','fr-FR','\x20MB)','16NxEKZw','parse','2869884QgsYNQ','Vérification\x20de\x20','\x20\x20Aucune\x20dépendance\x20trouvée','exit','custom','.aar','\x0aUtilitaire\x20de\x20gestion\x20des\x20dépendances\x0a\x0aUtilisation:\x20node\x20manage-dependencies.js\x20/chemin/vers/projet\x20[commande]\x0a\x0aCommandes:\x0a\x20\x20list\x20\x20\x20\x20\x20\x20-\x20Afficher\x20les\x20dépendances\x20déclarées\x20(défaut)\x0a\x20\x20check\x20\x20\x20\x20\x20-\x20Vérifier\x20les\x20dépendances\x20téléchargées\x0a\x20\x20clean\x20\x20\x20\x20\x20-\x20Supprimer\x20tous\x20les\x20AAR\x20téléchargés\x0a\x20\x20verify\x20\x20\x20\x20-\x20Vérifier\x20l\x27intégrité\x20des\x20fichiers\x20AAR\x0a\x20\x20help\x20\x20\x20\x20\x20\x20-\x20Afficher\x20cette\x20aide\x0a\x0aExemples:\x0a\x20\x20node\x20manage-dependencies.js\x20.\x20list\x0a\x20\x20node\x20manage-dependencies.js\x20.\x20check\x0a\x20\x20node\x20manage-dependencies.js\x20.\x20clean\x0a\x20\x20node\x20manage-dependencies.js\x20.\x20verify\x0a\x20\x20\x20\x20','forEach','argv','601580ecEobA','\x20fichier(s)\x20trouvé(s):\x0a','name','verify','readFileSync','length','✓\x20Supprimé:\x20','❌\x20Aucune\x20dépendance\x20téléchargée\x0a','405520iWVgds','app-config.json','Rien\x20à\x20nettoyer\x20(répertoire\x20non\x20trouvé)\x0a','readSync','error','endsWith','utf-8','\x20fichier(s):\x0a','unlinkSync','androidx','Aucune\x20dépendance\x20à\x20vérifier\x0a','5333LksopN','path','\x0a🔍\x20Vérification\x20de\x20l\x27intégrité\x20des\x20dépendances\x0a','cwd','\x20-\x20INVALIDE\x20(format\x20corrompu)','closeSync','\x20\x20\x20\x20Modifié:\x20','filter','size','706320CurRIV','existsSync','dependencies','\x20-\x20Valide\x20(','alloc','toLocaleDateString','2-digit','161742tKciHV','ERREUR:\x20app-config.json\x20non\x20trouvé','❌\x20Aucune\x20dépendance\x20téléchargée\x20(répertoire\x20build/libs/\x20non\x20trouvé)\x0a','📱\x20AndroidX:','📦\x20Personnalisées:','mtime','\x0a✅\x20','Aucune\x20dépendance\x20trouvée\x0a','toFixed','\x20fichier(s)\x20supprimé(s)\x0a','check','join','crypto','\x0a🗑️\x20\x20Nettoyage\x20des\x20dépendances\x0a'];a0_0x358f=function(){return _0x20732c;};return a0_0x358f();}function cleanDependencies(){const _0x43ef95=a0_0xfae0ae;console[_0x43ef95(0x126)](_0x43ef95(0x124));if(!fs[_0x43ef95(0x111)](libsDir)){console[_0x43ef95(0x126)](_0x43ef95(0xfe));return;}const _0x4b2299=fs[_0x43ef95(0x128)](libsDir)[_0x43ef95(0x10e)](_0x530213=>_0x530213[_0x43ef95(0x101)](_0x43ef95(0x137)));if(_0x4b2299[_0x43ef95(0x140)]===0x0){console[_0x43ef95(0x126)]('Rien\x20à\x20nettoyer\x0a');return;}for(const _0x1720ff of _0x4b2299){const _0xf08235=path[_0x43ef95(0x122)](libsDir,_0x1720ff);fs[_0x43ef95(0x104)](_0xf08235),console[_0x43ef95(0x126)](_0x43ef95(0x141)+_0x1720ff);}console[_0x43ef95(0x126)](_0x43ef95(0x11d)+_0x4b2299[_0x43ef95(0x140)]+_0x43ef95(0x120));}function verifiyIntegrity(){const _0x496f0f=a0_0xfae0ae;console[_0x496f0f(0x126)](_0x496f0f(0x109));if(!fs[_0x496f0f(0x111)](libsDir)){console[_0x496f0f(0x126)](_0x496f0f(0x106));return;}const _0xf30ada=fs[_0x496f0f(0x128)](libsDir)[_0x496f0f(0x10e)](_0x77fcd1=>_0x77fcd1[_0x496f0f(0x101)](_0x496f0f(0x137)));if(_0xf30ada[_0x496f0f(0x140)]===0x0){console[_0x496f0f(0x126)](_0x496f0f(0x11e));return;}console[_0x496f0f(0x126)](_0x496f0f(0x133)+_0xf30ada[_0x496f0f(0x140)]+_0x496f0f(0x103)),_0xf30ada[_0x496f0f(0x139)](_0x35b732=>{const _0x1e33cf=_0x496f0f,_0x36db1a=path['join'](libsDir,_0x35b732),_0x5a88d9=fs[_0x1e33cf(0x125)](_0x36db1a),_0x19eb90=Buffer[_0x1e33cf(0x114)](0x4),_0x4336a0=fs['openSync'](_0x36db1a,'r');fs[_0x1e33cf(0xff)](_0x4336a0,_0x19eb90,0x0,0x4,0x0),fs[_0x1e33cf(0x10c)](_0x4336a0);const _0x5a5e2c=_0x19eb90[0x0]===0x50&&_0x19eb90[0x1]===0x4b&&_0x19eb90[0x2]===0x3&&_0x19eb90[0x3]===0x4;_0x5a5e2c?console[_0x1e33cf(0x126)]('✓\x20'+_0x35b732+_0x1e33cf(0x113)+(_0x5a88d9[_0x1e33cf(0x10f)]/0x400/0x400)[_0x1e33cf(0x11f)](0x2)+_0x1e33cf(0x12f)):console[_0x1e33cf(0x126)]('✗\x20'+_0x35b732+_0x1e33cf(0x10b));}),console[_0x496f0f(0x126)]('');}function showHelp(){const _0x331e7a=a0_0xfae0ae;console[_0x331e7a(0x126)](_0x331e7a(0x138));}switch(command['toLowerCase']()){case a0_0xfae0ae(0x12b):listDependencies();break;case a0_0xfae0ae(0x121):checkDownloaded();break;case'clean':cleanDependencies();break;case a0_0xfae0ae(0x13e):verifiyIntegrity();break;case'help':showHelp();break;default:listDependencies();}
@@ -1,203 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require('fs');
4
- const path = require('path');
5
- const https = require('https');
6
- const http = require('http');
7
-
8
- /**
9
- * Gestionnaire automatique de dépendances
10
- * Lit les dépendances depuis app-config.json et les traite automatiquement
11
- */
12
-
13
- const projectDir = process.argv[2] || process.cwd();
14
- const configPath = path.join(projectDir, 'app-config.json');
15
- const buildDir = path.join(projectDir, 'build');
16
- const libsDir = path.join(buildDir, 'libs');
17
-
18
- // Vérifier que app-config.json existe
19
- if (!fs.existsSync(configPath)) {
20
- console.error('ERREUR: app-config.json non trouvé');
21
- process.exit(1);
22
- }
23
-
24
- // Charger la configuration
25
- const appConfig = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
26
-
27
- // Créer le répertoire des libs
28
- if (!fs.existsSync(libsDir)) {
29
- fs.mkdirSync(libsDir, { recursive: true });
30
- }
31
-
32
- const MAVEN_GOOGLE = 'https://maven.google.com';
33
- const MAVEN_CENTRAL = 'https://repo.maven.apache.org/maven2';
34
-
35
- console.log('📦 Traitement automatique des dépendances\n');
36
-
37
- // Vérifier s'il y a des dépendances
38
- if (!appConfig.dependencies) {
39
- console.log('ℹ️ Aucune dépendance déclarée dans app-config.json');
40
- process.exit(0);
41
- }
42
-
43
- const allDeps = [];
44
-
45
- // Traiter les dépendances AndroidX
46
- if (appConfig.dependencies.androidx && Array.isArray(appConfig.dependencies.androidx)) {
47
- console.log('📥 Dépendances AndroidX trouvées:\n');
48
-
49
- for (const dep of appConfig.dependencies.androidx) {
50
- console.log(` - ${dep.name}`);
51
- allDeps.push({
52
- type: 'androidx',
53
- name: dep.name,
54
- artifact: dep.aar,
55
- filename: path.basename(dep.aar)
56
- });
57
- }
58
- console.log('');
59
- }
60
-
61
- // Traiter les dépendances personnalisées
62
- if (appConfig.dependencies.custom && Array.isArray(appConfig.dependencies.custom)) {
63
- console.log('📥 Dépendances personnalisées trouvées:\n');
64
-
65
- for (const dep of appConfig.dependencies.custom) {
66
- console.log(` - ${dep.name}`);
67
- allDeps.push({
68
- type: 'custom',
69
- name: dep.name,
70
- artifact: dep.aar || dep.url,
71
- filename: dep.filename || path.basename(dep.aar || dep.url)
72
- });
73
- }
74
- console.log('');
75
- }
76
-
77
- if (allDeps.length === 0) {
78
- console.log('ℹ️ Aucune dépendance à traiter');
79
- process.exit(0);
80
- }
81
-
82
- // Créer le fichier de configuration pour le compilateur
83
- const depsConfig = {
84
- projectName: appConfig.appName,
85
- packageName: appConfig.packageName,
86
- dependencies: allDeps.map(d => ({
87
- name: d.name,
88
- type: d.type,
89
- local: path.join(libsDir, d.filename),
90
- aar: path.join(libsDir, d.filename),
91
- classes: path.join(libsDir, d.filename.replace('.aar', '.jar'))
92
- }))
93
- };
94
-
95
- const depsConfigPath = path.join(buildDir, 'dependencies-config.json');
96
- fs.writeFileSync(depsConfigPath, JSON.stringify(depsConfig, null, 2), 'utf-8');
97
-
98
- console.log(`✓ Configuration des dépendances créée: ${depsConfigPath}\n`);
99
-
100
- // Fonction pour télécharger une dépendance
101
- async function downloadDependency(url, filepath) {
102
- return new Promise((resolve, reject) => {
103
- const protocol = url.startsWith('https') ? https : http;
104
-
105
- const file = fs.createWriteStream(filepath);
106
-
107
- protocol.get(url, (response) => {
108
- // Gérer les redirections
109
- if (response.statusCode === 302 || response.statusCode === 301) {
110
- downloadDependency(response.headers.location, filepath)
111
- .then(resolve)
112
- .catch(reject);
113
- return;
114
- }
115
-
116
- if (response.statusCode !== 200) {
117
- reject(new Error(`Status ${response.statusCode}`));
118
- return;
119
- }
120
-
121
- response.pipe(file);
122
-
123
- file.on('finish', () => {
124
- file.close();
125
- resolve();
126
- });
127
- }).on('error', (err) => {
128
- fs.unlink(filepath, () => {});
129
- reject(err);
130
- });
131
- });
132
- }
133
-
134
- // Télécharger les dépendances
135
- async function downloadAll() {
136
- console.log('📥 Vérification des dépendances...\n');
137
-
138
- let downloadedCount = 0;
139
- let skippedCount = 0;
140
- let errorCount = 0;
141
-
142
- for (const dep of allDeps) {
143
- const filepath = path.join(libsDir, dep.filename);
144
-
145
- // Vérifier si le fichier existe déjà
146
- if (fs.existsSync(filepath)) {
147
- const stats = fs.statSync(filepath);
148
- const sizeMB = (stats.size / 1024 / 1024).toFixed(2);
149
- console.log(`✓ Existe déjà: ${dep.filename} (${sizeMB} MB)`);
150
- skippedCount++;
151
- continue;
152
- }
153
-
154
- console.log(`📥 Téléchargement: ${dep.name}`);
155
-
156
- try {
157
- let url = dep.artifact;
158
-
159
- // Si c'est une dépendance AndroidX, construire l'URL Maven
160
- if (dep.type === 'androidx' && !dep.artifact.startsWith('http')) {
161
- // Essayer Maven Google en premier
162
- try {
163
- await downloadDependency(`${MAVEN_GOOGLE}/${dep.artifact}`, filepath);
164
- const stats = fs.statSync(filepath);
165
- const sizeMB = (stats.size / 1024 / 1024).toFixed(2);
166
- console.log(`✓ Téléchargé: ${dep.filename} (${sizeMB} MB)\n`);
167
- downloadedCount++;
168
- } catch (e) {
169
- // Fallback sur Maven Central
170
- await downloadDependency(`${MAVEN_CENTRAL}/${dep.artifact}`, filepath);
171
- const stats = fs.statSync(filepath);
172
- const sizeMB = (stats.size / 1024 / 1024).toFixed(2);
173
- console.log(`✓ Téléchargé: ${dep.filename} (${sizeMB} MB)\n`);
174
- downloadedCount++;
175
- }
176
- } else {
177
- // URL personnalisée directe
178
- await downloadDependency(url, filepath);
179
- const stats = fs.statSync(filepath);
180
- const sizeMB = (stats.size / 1024 / 1024).toFixed(2);
181
- console.log(`✓ Téléchargé: ${dep.filename} (${sizeMB} MB)\n`);
182
- downloadedCount++;
183
- }
184
- } catch (error) {
185
- console.error(`✗ Erreur: ${dep.name} - ${error.message}\n`);
186
- errorCount++;
187
- }
188
- }
189
-
190
- console.log('\n📊 Résumé:');
191
- console.log(` 📥 Téléchargés: ${downloadedCount}`);
192
- console.log(` ✓ Existants: ${skippedCount}`);
193
- if (errorCount > 0) {
194
- console.log(` ✗ Erreurs: ${errorCount}`);
195
- }
196
- console.log(`\n✅ Dépendances disponibles dans: ${libsDir}`);
197
- }
198
-
199
- // Lancer le téléchargement
200
- downloadAll().catch(err => {
201
- console.error('\nERREUR:', err.message);
202
- process.exit(1);
203
- });
@@ -1,147 +0,0 @@
1
- // (cherche dépendances inutilisées et modifie package.json pour exclure avant packaging
2
- // Usage: node build_tools/prune_modules.js --path=./app_src
3
- const fs = require('fs');
4
- const path = require('path');
5
- const depcheck = require('depcheck');
6
- const argv = require('minimist')(process.argv.slice(2));
7
- const appPath = path.resolve(argv.path || './app_src');
8
- const projectRoot = path.resolve('.');
9
-
10
- (async function(){
11
- console.log('Running depcheck on', appPath);
12
- // Modules Electron essentiels (toujours conservés)
13
- const electronCoreModules = [
14
- 'electron',
15
- '@electron/remote',
16
- 'electron-store' // Pour la persistance des données
17
- ];
18
-
19
- // Modules Node.js essentiels
20
- const nodeCoreModules = [
21
- 'crypto',
22
- 'fs',
23
- 'path',
24
- 'child_process',
25
- 'os',
26
- 'events',
27
- 'stream',
28
- 'util'
29
- ];
30
-
31
- // Modules Electron optionnels (à vérifier usage réel)
32
- const electronOptionalModules = [
33
- 'electron-log', // Logging
34
- 'electron-updater', // Auto-update
35
- 'electron-window-state', // Gestion état fenêtre
36
- 'electron-reload', // Hot reload
37
- 'electron-devtools-installer',
38
- 'electron-debug',
39
- 'electron-context-menu',
40
- 'electron-localshortcut'
41
- ];
42
-
43
- // Fonction pour vérifier si un module est utilisé dans le code
44
- const checkModuleUsage = (content, moduleName) => {
45
- const patterns = [
46
- new RegExp(`require\\(['"]${moduleName}['"]\\)`),
47
- new RegExp(`import .* from ['"]${moduleName}['"]`),
48
- new RegExp(`require\\.resolve\\(['"]${moduleName}['"]\\)`),
49
- // Cherche aussi les sous-modules (ex: electron.app, electron.BrowserWindow)
50
- new RegExp(`(?:require\\(['"]${moduleName}['"]\\)|import .* from ['"]${moduleName}['"]).*\\.(\\w+)`)
51
- ];
52
- return patterns.some(pattern => pattern.test(content));
53
- };
54
-
55
- const dynamicModules = [
56
- ...electronCoreModules,
57
- ...nodeCoreModules,
58
- 'bytenode' // Pour la compilation en bytecode
59
- ];
60
-
61
- const options = {
62
- ignoreDirs: ['test', 'tests', 'vendor'],
63
- detectors: [
64
- depcheck.detector.requireCallExpression,
65
- depcheck.detector.importDeclaration,
66
- depcheck.detector.exportDeclaration,
67
- // Détecteur personnalisé pour electron et ses sous-modules
68
- content => {
69
- const electronApis = new Set();
70
- const electronApiPattern = /(?:require\(['"]electron['"]\)|import .* from ['"]electron['"]).*\.([\w]+)/g;
71
- let match;
72
-
73
- // Collecter tous les APIs Electron utilisés
74
- while ((match = electronApiPattern.exec(content)) !== null) {
75
- electronApis.add(match[1]);
76
- }
77
-
78
- // Logger les APIs Electron trouvés
79
- if (electronApis.size > 0) {
80
- console.log('APIs Electron utilisés:', Array.from(electronApis));
81
- }
82
-
83
- // Vérifier l'utilisation des modules optionnels
84
- const usedOptional = electronOptionalModules.filter(module =>
85
- checkModuleUsage(content, module)
86
- );
87
-
88
- if (usedOptional.length > 0) {
89
- console.log('Modules Electron optionnels utilisés:', usedOptional);
90
- }
91
-
92
- return [...electronApis, ...usedOptional];
93
- },
94
- // Détecteur pour require.resolve()
95
- content => {
96
- const requires = [];
97
- const regex = /require\.resolve\(['"]([^'"]+)['"]\)/g;
98
- let match;
99
- while ((match = regex.exec(content)) !== null) {
100
- requires.push(match[1]);
101
- }
102
- return requires;
103
- }
104
- ],
105
- ignorePatterns: ['*.jsc', '*.obf.js']
106
- };
107
- depcheck(projectRoot, options, (unused) => {
108
- console.log('Dependencies used:', Object.keys(unused.using).length);
109
- if (unused.dependencies && unused.dependencies.length) {
110
- console.log('Unused dependencies found:', unused.dependencies);
111
- // Générer un rapport détaillé sans supprimer
112
- const pkg = JSON.parse(fs.readFileSync(path.join(projectRoot,'package.json'),'utf8'));
113
- const actuallyUnused = unused.dependencies.filter(dep => {
114
- if (dynamicModules.includes(dep)) return false;
115
- if (electronOptionalModules.includes(dep)) {
116
- const isUsed = Object.keys(unused.using).some(file =>
117
- checkModuleUsage(fs.readFileSync(file, 'utf8'), dep)
118
- );
119
- if (isUsed) return false;
120
- return true;
121
- }
122
- return true;
123
- });
124
-
125
- const report = [];
126
- report.push('=== Rapport d\'analyse des dépendances (Electron Lite) ===\n');
127
- report.push('Modules inclus (utilisés ou essentiels):');
128
- const included = Object.keys(pkg.dependencies).filter(dep => !actuallyUnused.includes(dep));
129
- included.forEach(dep => report.push(` - ${dep}`));
130
- report.push('\nModules exclus (non utilisés, à ignorer pour un build lite):');
131
- actuallyUnused.forEach(dep => report.push(` - ${dep}`));
132
- report.push('\nDétail:');
133
- report.push(' Modules Electron essentiels: ' + electronCoreModules.join(', '));
134
- report.push(' Modules Node.js essentiels: ' + nodeCoreModules.join(', '));
135
- report.push(' Modules Electron optionnels: ' + electronOptionalModules.join(', '));
136
- report.push('\nCe rapport est informatif. Aucun module n\'a été supprimé automatiquement.');
137
- const reportPath = path.join(projectRoot, 'electron-lite-deps-report.txt');
138
- fs.writeFileSync(reportPath, report.join('\n'));
139
- console.log(`\n[prune_modules] Rapport généré: ${reportPath}`);
140
- } else {
141
- console.log('No unused dependencies found by depcheck.');
142
- const reportPath = path.join(projectRoot, 'electron-lite-deps-report.txt');
143
- fs.writeFileSync(reportPath, 'Aucune dépendance inutilisée détectée.');
144
- console.log(`[prune_modules] Rapport généré: ${reportPath}`);
145
- }
146
- });
147
- })();
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const a0_0x590520=a0_0x31c7;(function(_0x1c5980,_0x463ef9){const _0x2bd761=a0_0x31c7,_0x45a5b0=_0x1c5980();while(!![]){try{const _0x3362e2=parseInt(_0x2bd761(0x149))/0x1+-parseInt(_0x2bd761(0x178))/0x2*(parseInt(_0x2bd761(0x12d))/0x3)+-parseInt(_0x2bd761(0x150))/0x4*(-parseInt(_0x2bd761(0x15f))/0x5)+parseInt(_0x2bd761(0x13f))/0x6+parseInt(_0x2bd761(0x164))/0x7*(parseInt(_0x2bd761(0x17c))/0x8)+-parseInt(_0x2bd761(0x144))/0x9*(parseInt(_0x2bd761(0x11f))/0xa)+-parseInt(_0x2bd761(0x152))/0xb;if(_0x3362e2===_0x463ef9)break;else _0x45a5b0['push'](_0x45a5b0['shift']());}catch(_0x31d329){_0x45a5b0['push'](_0x45a5b0['shift']());}}}(a0_0x10ac,0x503e4));const fs=require('fs'),path=require(a0_0x590520(0x12f)),https=require(a0_0x590520(0x16e)),http=require('http'),{execSync}=require(a0_0x590520(0x168)),projectDir=process[a0_0x590520(0x17a)][0x2]||process[a0_0x590520(0x14f)](),buildDir=path[a0_0x590520(0x165)](projectDir,a0_0x590520(0x176)),libsDir=path['join'](buildDir,'libs'),libsExtractedDir=path[a0_0x590520(0x165)](buildDir,a0_0x590520(0x136)),MAVEN_GOOGLE=a0_0x590520(0x122),MAVEN_CENTRAL=a0_0x590520(0x139);console[a0_0x590520(0x129)](a0_0x590520(0x15b));function getSevenZipPath(){const _0x4dd862=a0_0x590520,_0x1a797d=__dirname,_0x5e2b3c=process[_0x4dd862(0x14e)],_0x49b060=process[_0x4dd862(0x159)];if(_0x5e2b3c===_0x4dd862(0x160)){const _0x1bedb7=_0x49b060===_0x4dd862(0x132)?_0x4dd862(0x132):_0x49b060===_0x4dd862(0x131)?'arm64':_0x4dd862(0x13b);return path['join'](_0x1a797d,_0x4dd862(0x151),'7zip-bin',_0x4dd862(0x180),_0x1bedb7,_0x4dd862(0x12e));}else{if(_0x5e2b3c===_0x4dd862(0x137))return path[_0x4dd862(0x165)](_0x1a797d,_0x4dd862(0x151),_0x4dd862(0x123),_0x4dd862(0x137),_0x4dd862(0x132),'7za');else{if(_0x5e2b3c==='darwin')return path[_0x4dd862(0x165)](_0x1a797d,_0x4dd862(0x151),_0x4dd862(0x123),_0x4dd862(0x16f),'x64','7za');}}throw new Error(_0x4dd862(0x12a)+_0x5e2b3c);}function a0_0x10ac(){const _0x2a88cc=['\x20\x20→\x20','69769qBKAru','join','group','filter','child_process','now','\x20\x20✓\x20Existantes:\x20','toFixed','✓\x20Aucune\x20dépendance\x20transitive\x20trouvée\x0a','\x22\x20\x22META-INF/pom.xml\x22\x20-o\x22','https','mac','\x20(trouvé\x20dans\x20','readdirSync','finish','version','pipe','\x20dépendance(s)\x20transitive(s)\x20téléchargée(s)','build','message','88NVHeWa','Status\x20','argv','compile','280wgQLTg','createWriteStream','\x20\x20✓\x20Téléchargé:\x20','\x22\x20-y','win','\x0a📊\x20Résumé\x20des\x20dépendances\x20transitives:','existsSync','6830GpWiDj','readFileSync','\x0a✅\x20','https://maven.google.com','7zip-bin','\x0a🔽\x20Dépendances\x20transitives\x20détectées:\x20','set','\x20MB)\x0a','warn','replace','log','Plateforme\x20non\x20supportée:\x20','toString','has','3732dvgQnX','7za.exe','path','exit','arm64','x64','📋\x20Scanning\x20des\x20AARs\x20pour\x20les\x20pom.xml...\x0a','location','provided','libs-extracted','linux','.aar','https://repo.maven.apache.org/maven2','✓\x20Existe\x20déjà:\x20','ia32','utf8','\x20\x20⚠\x20Impossible\x20de\x20parser\x20','statusCode','2034366wlqvzB','match','unlink','Échec\x20sur\x20Google\x20et\x20Central:\x20','get','4185QfedhU','substr','basename','\x20-\x20','startsWith','467616XbmkpX','META-INF','close','headers','\x0aERREUR:','platform','cwd','368212CYbRBB','vendor','8037414lCRkYI','\x0a✅\x20Toutes\x20les\x20dépendances\x20transitives\x20étaient\x20déjà\x20présentes','rmSync','endsWith','📥\x20Téléchargement\x20des\x20dépendances\x20transitives...\x0a','catch','ℹ️\x20\x20Aucun\x20répertoire\x20libs\x20trouvé','arch','\x22\x20x\x20\x22','🔗\x20Résolution\x20des\x20dépendances\x20transitives\x0a','size','random','then','15OCoBwQ','win32','\x20\x20✗\x20Erreurs:\x20','error'];a0_0x10ac=function(){return _0x2a88cc;};return a0_0x10ac();}const SEVENZIP=getSevenZipPath();!fs[a0_0x590520(0x182)](libsDir)&&(console[a0_0x590520(0x129)](a0_0x590520(0x158)),process['exit'](0x0));function a0_0x31c7(_0x50a2aa,_0x5c51e0){_0x50a2aa=_0x50a2aa-0x11f;const _0x10aca3=a0_0x10ac();let _0x31c7a7=_0x10aca3[_0x50a2aa];return _0x31c7a7;}const transitiveDeps=new Map(),processedAars=new Set();function extractAndParsePom(_0x398731){const _0x52bde8=a0_0x590520,_0x6c8f31=path[_0x52bde8(0x146)](_0x398731);if(processedAars[_0x52bde8(0x12c)](_0x6c8f31))return;processedAars['add'](_0x6c8f31);try{const _0x5026c9=path['join'](libsExtractedDir,'temp_pom_'+Date[_0x52bde8(0x169)]()+'_'+Math[_0x52bde8(0x15d)]()[_0x52bde8(0x12b)](0x24)[_0x52bde8(0x145)](0x2,0x9));fs['mkdirSync'](_0x5026c9,{'recursive':!![]});const _0x451291='\x22'+SEVENZIP+_0x52bde8(0x15a)+_0x398731+_0x52bde8(0x16d)+_0x5026c9+_0x52bde8(0x17f);try{execSync(_0x451291,{'stdio':_0x52bde8(0x174),'shell':'cmd.exe'});}catch(_0x274a2){fs[_0x52bde8(0x154)](_0x5026c9,{'recursive':!![],'force':!![]});return;}const _0x47ae3a=path['join'](_0x5026c9,_0x52bde8(0x14a),'pom.xml');if(!fs[_0x52bde8(0x182)](_0x47ae3a)){fs['rmSync'](_0x5026c9,{'recursive':!![],'force':!![]});return;}const _0x2c0ed6=fs[_0x52bde8(0x120)](_0x47ae3a,_0x52bde8(0x13c)),_0x4ea4ac=/<dependency>([\s\S]*?)<\/dependency>/g;let _0x43d904;while((_0x43d904=_0x4ea4ac['exec'](_0x2c0ed6))!==null){const _0x29825d=_0x43d904[0x1],_0x58d9a0=_0x29825d['match'](/<groupId>([^<]+)<\/groupId>/),_0x1b5e48=_0x29825d[_0x52bde8(0x140)](/<artifactId>([^<]+)<\/artifactId>/),_0x5eba50=_0x29825d['match'](/<version>([^<]+)<\/version>/),_0x5d8ab9=_0x29825d['match'](/<scope>([^<]+)<\/scope>/);if(!_0x58d9a0||!_0x1b5e48)continue;const _0x8d9157=_0x58d9a0[0x1],_0x3c4caa=_0x1b5e48[0x1],_0x5e5671=_0x5eba50?_0x5eba50[0x1]:'UNKNOWN',_0x464ad2=_0x5d8ab9?_0x5d8ab9[0x1]:_0x52bde8(0x17b);if(_0x464ad2==='test'||_0x464ad2===_0x52bde8(0x135))continue;const _0x35f084=_0x8d9157+':'+_0x3c4caa,_0x1ea8d0=_0x8d9157+':'+_0x3c4caa+':'+_0x5e5671;!transitiveDeps['has'](_0x35f084)&&(console[_0x52bde8(0x129)](_0x52bde8(0x163)+_0x1ea8d0+_0x52bde8(0x170)+_0x6c8f31+')'),transitiveDeps[_0x52bde8(0x125)](_0x35f084,{'group':_0x8d9157,'artifact':_0x3c4caa,'version':_0x5e5671,'scope':_0x464ad2}));}fs[_0x52bde8(0x154)](_0x5026c9,{'recursive':!![],'force':!![]});}catch(_0x786267){console[_0x52bde8(0x127)](_0x52bde8(0x13d)+_0x6c8f31+':\x20'+_0x786267[_0x52bde8(0x177)]);}}console[a0_0x590520(0x129)](a0_0x590520(0x133));const aarFiles=fs[a0_0x590520(0x171)](libsDir)[a0_0x590520(0x167)](_0x18c83d=>_0x18c83d[a0_0x590520(0x155)](a0_0x590520(0x138)));for(const aarFile of aarFiles){const aarPath=path['join'](libsDir,aarFile);extractAndParsePom(aarPath);}transitiveDeps['size']===0x0&&(console[a0_0x590520(0x129)](a0_0x590520(0x16c)),process[a0_0x590520(0x130)](0x0));console[a0_0x590520(0x129)](a0_0x590520(0x124)+transitiveDeps['size']+'\x0a');async function downloadDependency(_0x33810c,_0x5158ce){return new Promise((_0x137656,_0x344bf6)=>{const _0x3c8124=a0_0x31c7,_0xe58699=_0x33810c[_0x3c8124(0x148)](_0x3c8124(0x16e))?https:http,_0x15f646=fs[_0x3c8124(0x17d)](_0x5158ce);_0xe58699[_0x3c8124(0x143)](_0x33810c,_0x39f9f5=>{const _0x4b4d27=_0x3c8124;if(_0x39f9f5[_0x4b4d27(0x13e)]===0x12e||_0x39f9f5[_0x4b4d27(0x13e)]===0x12d){downloadDependency(_0x39f9f5[_0x4b4d27(0x14c)][_0x4b4d27(0x134)],_0x5158ce)[_0x4b4d27(0x15e)](_0x137656)[_0x4b4d27(0x157)](_0x344bf6);return;}if(_0x39f9f5[_0x4b4d27(0x13e)]!==0xc8){_0x344bf6(new Error(_0x4b4d27(0x179)+_0x39f9f5['statusCode']));return;}_0x39f9f5['pipe'](_0x15f646),_0x15f646['on'](_0x4b4d27(0x172),()=>{const _0x3f1221=_0x4b4d27;_0x15f646[_0x3f1221(0x14b)](),_0x137656();});})['on']('error',_0x1cc994=>{const _0x2d12ee=_0x3c8124;fs[_0x2d12ee(0x141)](_0x5158ce,()=>{}),_0x344bf6(_0x1cc994);});});}async function downloadTransitiveDeps(){const _0x25a6a4=a0_0x590520;let _0x3272a6=0x0,_0xc9bbb3=0x0,_0x360a1c=0x0;console[_0x25a6a4(0x129)](_0x25a6a4(0x156));for(const [_0x59b976,_0x1c71f1]of transitiveDeps){const _0x420454=_0x1c71f1['artifact']+'-'+_0x1c71f1['version']+_0x25a6a4(0x138),_0x1939b6=path[_0x25a6a4(0x165)](libsDir,_0x420454);if(fs[_0x25a6a4(0x182)](_0x1939b6)){const _0x1f9970=fs['statSync'](_0x1939b6),_0x2242d3=(_0x1f9970[_0x25a6a4(0x15c)]/0x400/0x400)['toFixed'](0x2);console['log'](_0x25a6a4(0x13a)+_0x420454+'\x20('+_0x2242d3+'\x20MB)'),_0xc9bbb3++;continue;}console[_0x25a6a4(0x129)]('📥\x20Téléchargement:\x20'+_0x59b976+':'+_0x1c71f1[_0x25a6a4(0x173)]);try{const _0x3d174f=_0x1c71f1[_0x25a6a4(0x166)][_0x25a6a4(0x128)](/\./g,'/')+'/'+_0x1c71f1['artifact']+'/'+_0x1c71f1[_0x25a6a4(0x173)]+'/'+_0x420454;let _0x267f98=![];try{await downloadDependency(MAVEN_GOOGLE+'/'+_0x3d174f,_0x1939b6),_0x267f98=!![];}catch(_0x4ab1aa){try{await downloadDependency(MAVEN_CENTRAL+'/'+_0x3d174f,_0x1939b6),_0x267f98=!![];}catch(_0x1ec7ef){throw new Error(_0x25a6a4(0x142)+_0x1ec7ef[_0x25a6a4(0x177)]);}}if(_0x267f98){const _0x56f1f0=fs['statSync'](_0x1939b6),_0xdc2c8=(_0x56f1f0[_0x25a6a4(0x15c)]/0x400/0x400)[_0x25a6a4(0x16b)](0x2);console[_0x25a6a4(0x129)](_0x25a6a4(0x17e)+_0x420454+'\x20('+_0xdc2c8+_0x25a6a4(0x126)),_0x3272a6++;}}catch(_0x5af3e1){console[_0x25a6a4(0x162)]('\x20\x20✗\x20Erreur:\x20'+_0x59b976+_0x25a6a4(0x147)+_0x5af3e1[_0x25a6a4(0x177)]+'\x0a'),_0x360a1c++;}}console[_0x25a6a4(0x129)](_0x25a6a4(0x181)),console[_0x25a6a4(0x129)]('\x20\x20📥\x20Téléchargées:\x20'+_0x3272a6),console[_0x25a6a4(0x129)](_0x25a6a4(0x16a)+_0xc9bbb3);_0x360a1c>0x0&&console[_0x25a6a4(0x129)](_0x25a6a4(0x161)+_0x360a1c);if(_0x3272a6>0x0)console[_0x25a6a4(0x129)](_0x25a6a4(0x121)+_0x3272a6+_0x25a6a4(0x175));else _0xc9bbb3>0x0&&console[_0x25a6a4(0x129)](_0x25a6a4(0x153));}downloadTransitiveDeps()[a0_0x590520(0x157)](_0x333c4f=>{const _0x1af7d0=a0_0x590520;console['error'](_0x1af7d0(0x14d),_0x333c4f[_0x1af7d0(0x177)]),process['exit'](0x1);});
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const _0x2e84c0=_0x28fe;(function(_0xa781a0,_0x45b67d){const _0x294bac=_0x28fe,_0x599fa9=_0xa781a0();while(!![]){try{const _0x169017=-parseInt(_0x294bac(0x143))/0x1*(parseInt(_0x294bac(0x18c))/0x2)+-parseInt(_0x294bac(0x157))/0x3*(parseInt(_0x294bac(0x175))/0x4)+-parseInt(_0x294bac(0x15e))/0x5+parseInt(_0x294bac(0x184))/0x6+parseInt(_0x294bac(0x14e))/0x7*(parseInt(_0x294bac(0x17b))/0x8)+-parseInt(_0x294bac(0x15b))/0x9+-parseInt(_0x294bac(0x164))/0xa*(-parseInt(_0x294bac(0x178))/0xb);if(_0x169017===_0x45b67d)break;else _0x599fa9['push'](_0x599fa9['shift']());}catch(_0x10282c){_0x599fa9['push'](_0x599fa9['shift']());}}}(_0x2718,0x788e8));const fs=require('fs'),path=require(_0x2e84c0(0x13d)),readline=require('readline');let projectDir=null;if(process[_0x2e84c0(0x18a)][0x2])projectDir=path[_0x2e84c0(0x132)](process[_0x2e84c0(0x18a)][0x2]);else{if(process['env'][_0x2e84c0(0x133)])projectDir=path['resolve'](process['env'][_0x2e84c0(0x133)]);else{const defaultPaths=[path[_0x2e84c0(0x14c)](__dirname,'..','..',_0x2e84c0(0x166)),path[_0x2e84c0(0x132)]('MyApp')];for(const checkPath of defaultPaths){if(checkPath&&fs[_0x2e84c0(0x17f)](checkPath)&&fs[_0x2e84c0(0x17f)](path[_0x2e84c0(0x14c)](checkPath,_0x2e84c0(0x189)))){projectDir=checkPath;break;}}}}(!projectDir||!fs[_0x2e84c0(0x17f)](projectDir))&&(console['error'](_0x2e84c0(0x137)),process[_0x2e84c0(0x17d)](0x1));function _0x2718(){const _0x265fd4=['floor','8260731qQgSVI','mkdirSync','CONFIRMER:\x20Taper\x20\x22JE\x20SUIS\x20SÛR\x22\x20pour\x20continuer:\x20','3814480FpRKXG','readFileSync','Aucun\x20backup\x20disponible.\x0a','filter','\x0a✓\x20Backup\x20restauré\x20avec\x20succès!\x0a','\x0a✓\x20Tous\x20les\x20backups\x20ont\x20été\x20supprimés!\x0a','20aHMULl','size','MyApp','\x0aAucun\x20backup\x20à\x20supprimer.\x0a','close','stdout','OUI','isDirectory','JE\x20SUIS\x20SÛR','fr-FR','folder','\x0aSuppression\x20annulée.\x0a','═══════════════════════════════════════════════════════════════','\x0a✓\x20Backup\x20supprimé\x20avec\x20succès!\x0a','\x0aConfirmer\x20la\x20restauration\x20de\x20','version','pop','17164dECQbB','packageName','meta.json','8638861pmRpHW','\x20\x20[D]\x20Supprimer\x20un\x20backup','copyFileSync','523144JsKRDy','✓\x20Restauré:\x20','exit','description','existsSync','message','\x20\x20\x20\x20Taille:\x20','error','stdin','4535952NPUizX','toUpperCase','statSync','\x20\x20\x20\x20Fichiers:\x20','\x20\x20\x20\x20Dossier:\x20','app-config.json','argv','question','604ZSgIKJ','╔════════════════════════════════════════════════════════════════╗','\x20\x20\x20\x20Description:\x20','Aucun\x20backup\x20trouvé.','length','clear','rmSync','date','\x20\x20[Q]\x20Quitter','utf-8','═══════════════════════════════════════════════════════════════\x0a','readdirSync','resolve','PROJECT_PATH','╚════════════════════════════════════════════════════════════════╝\x0a','toLocaleString','\x0a⚠\x20ATTENTION:\x20Supprimer\x20TOUS\x20les\x20backups?\x20(OUI/non):\x20','ERREUR:\x20Dossier\x20du\x20projet\x20non\x20trouvé!','0\x20B','parse','toFixed','name','\x0aNuméro\x20du\x20backup\x20à\x20supprimer\x20(ou\x20Q\x20pour\x20annuler):\x20','path','\x20\x20[C]\x20Tout\x20supprimer\x20(ATTENTION!)','createInterface','\x0aOption\x20invalide!\x0a','split','\x0aNuméro\x20invalide!\x0a','1849OIWUrD','files','reverse','\x20\x20[L]\x20Rafraîchir\x20la\x20liste','\x0a✗\x20Erreur\x20lors\x20de\x20la\x20suppression:\x20','basename','Backups\x20disponibles\x20(du\x20plus\x20récent\x20au\x20plus\x20ancien):\x0a','log','timestamp','join','\x0aAucun\x20backup\x20à\x20restaurer.\x0a','49iYFNoI','\x20\x20\x20\x20App:\x20','\x0a✗\x20Erreur\x20lors\x20de\x20la\x20restauration:\x20','\x0aRestauration\x20annulée.\x0a','sort','?\x20(OUI/non):\x20','\x0aConfirmer\x20la\x20suppression\x20de\x20','Options:','\x0aNuméro\x20du\x20backup\x20à\x20restaurer\x20(ou\x20Q\x20pour\x20annuler):\x20','36gOgvad','app','║\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GESTIONNAIRE\x20DE\x20BACKUPS\x20-\x20'];_0x2718=function(){return _0x265fd4;};return _0x2718();}const BACKUP_DIR=path['join'](projectDir,'.backup'),rl=readline[_0x2e84c0(0x13f)]({'input':process[_0x2e84c0(0x183)],'output':process[_0x2e84c0(0x169)]});function _0x28fe(_0x14e42b,_0x2cc6e7){const _0x2718ca=_0x2718();return _0x28fe=function(_0x28fe8e,_0x1bc6d9){_0x28fe8e=_0x28fe8e-0x12e;let _0x440503=_0x2718ca[_0x28fe8e];return _0x440503;},_0x28fe(_0x14e42b,_0x2cc6e7);}!fs[_0x2e84c0(0x17f)](BACKUP_DIR)&&fs[_0x2e84c0(0x15c)](BACKUP_DIR,{'recursive':!![]});function listBackups(){const _0x1c448e=_0x2e84c0;if(!fs['existsSync'](BACKUP_DIR))return console[_0x1c448e(0x14a)](_0x1c448e(0x18f)),[];const _0x1fd5b1=fs[_0x1c448e(0x131)](BACKUP_DIR)[_0x1c448e(0x161)](_0x3045ae=>fs['statSync'](path[_0x1c448e(0x14c)](BACKUP_DIR,_0x3045ae))[_0x1c448e(0x16b)]())[_0x1c448e(0x152)]()[_0x1c448e(0x145)]()['map'](_0x12aba9=>{const _0x48a299=_0x1c448e,_0x3a22ea=path[_0x48a299(0x14c)](BACKUP_DIR,_0x12aba9),_0x432543=path[_0x48a299(0x14c)](_0x3a22ea,'metadata.json');let _0x53d7a0={'timestamp':_0x12aba9,'files':[],'app':{}};if(fs[_0x48a299(0x17f)](_0x432543))try{_0x53d7a0=JSON[_0x48a299(0x139)](fs['readFileSync'](_0x432543,_0x48a299(0x12f)));}catch(_0x356340){}return{'folder':_0x12aba9,'timestamp':_0x53d7a0[_0x48a299(0x14b)],'date':new Date(_0x53d7a0['timestamp'])[_0x48a299(0x135)](_0x48a299(0x16d)),'app':_0x53d7a0[_0x48a299(0x158)]||{},'files':_0x53d7a0[_0x48a299(0x144)]||[],'size':getDirectorySize(_0x3a22ea)};});return _0x1fd5b1;}function getDirectorySize(_0x250a21){const _0x3d0897=_0x2e84c0;let _0x31dc96=0x0;const _0x1f3193=fs[_0x3d0897(0x131)](_0x250a21);for(const _0x2ed36b of _0x1f3193){const _0x502e1a=path[_0x3d0897(0x14c)](_0x250a21,_0x2ed36b),_0x5abaa2=fs[_0x3d0897(0x186)](_0x502e1a);_0x5abaa2['isDirectory']()?_0x31dc96+=getDirectorySize(_0x502e1a):_0x31dc96+=_0x5abaa2[_0x3d0897(0x165)];}return _0x31dc96;}function formatSize(_0x4118bd){const _0x37be15=_0x2e84c0;if(_0x4118bd===0x0)return _0x37be15(0x138);const _0x496eca=0x400,_0x455c47=['B','KB','MB','GB'],_0x5dfc30=Math[_0x37be15(0x15a)](Math[_0x37be15(0x14a)](_0x4118bd)/Math[_0x37be15(0x14a)](_0x496eca));return parseFloat((_0x4118bd/Math['pow'](_0x496eca,_0x5dfc30))[_0x37be15(0x13a)](0x2))+'\x20'+_0x455c47[_0x5dfc30];}function displayBackups(){const _0x3aa3f0=_0x2e84c0;console[_0x3aa3f0(0x191)](),console['log'](_0x3aa3f0(0x18d)),console[_0x3aa3f0(0x14a)](_0x3aa3f0(0x159)+projectDir[_0x3aa3f0(0x141)]('\x5c')[_0x3aa3f0(0x174)]()+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20║'),console[_0x3aa3f0(0x14a)](_0x3aa3f0(0x134));const _0x1bdbf2=listBackups();if(_0x1bdbf2[_0x3aa3f0(0x190)]===0x0){console[_0x3aa3f0(0x14a)](_0x3aa3f0(0x160)),showMenu();return;}console['log'](_0x3aa3f0(0x149)),_0x1bdbf2['forEach']((_0x322477,_0x2c86c5)=>{const _0x5d71a0=_0x3aa3f0;console[_0x5d71a0(0x14a)]('['+_0x2c86c5+']\x20'+_0x322477['date']),console[_0x5d71a0(0x14a)](_0x5d71a0(0x188)+_0x322477[_0x5d71a0(0x16e)]),_0x322477[_0x5d71a0(0x158)]&&_0x322477['app'][_0x5d71a0(0x13b)]&&(console[_0x5d71a0(0x14a)](_0x5d71a0(0x14f)+_0x322477[_0x5d71a0(0x158)][_0x5d71a0(0x13b)]+'\x20v'+_0x322477[_0x5d71a0(0x158)][_0x5d71a0(0x173)]),console[_0x5d71a0(0x14a)](_0x5d71a0(0x18e)+_0x322477[_0x5d71a0(0x158)][_0x5d71a0(0x17e)]),console[_0x5d71a0(0x14a)]('\x20\x20\x20\x20Package:\x20'+_0x322477[_0x5d71a0(0x158)][_0x5d71a0(0x176)])),console[_0x5d71a0(0x14a)](_0x5d71a0(0x181)+formatSize(_0x322477[_0x5d71a0(0x165)])),_0x322477['files'][_0x5d71a0(0x190)]>0x0&&console[_0x5d71a0(0x14a)](_0x5d71a0(0x187)+_0x322477['files']['join'](',\x20')),console[_0x5d71a0(0x14a)]();}),showMenu(_0x1bdbf2);}function showMenu(_0x491dfa=[]){const _0x55a9a0=_0x2e84c0;console['log'](_0x55a9a0(0x170)),console[_0x55a9a0(0x14a)](_0x55a9a0(0x155)),console[_0x55a9a0(0x14a)]('\x20\x20[R]\x20Restaurer\x20un\x20backup'),console[_0x55a9a0(0x14a)](_0x55a9a0(0x179)),console['log'](_0x55a9a0(0x13e)),console[_0x55a9a0(0x14a)](_0x55a9a0(0x146)),console[_0x55a9a0(0x14a)](_0x55a9a0(0x12e)),console[_0x55a9a0(0x14a)](_0x55a9a0(0x130)),rl[_0x55a9a0(0x18b)]('Choisir\x20une\x20option\x20(R/D/C/L/Q):\x20',_0x56f7ee=>{const _0x2146cf=_0x55a9a0,_0x50f5c6=_0x56f7ee['toUpperCase']();switch(_0x50f5c6){case'R':restoreBackup(_0x491dfa);break;case'D':deleteBackup(_0x491dfa);break;case'C':deleteAllBackups();break;case'L':displayBackups();break;case'Q':console['log']('\x0aAu\x20revoir!'),rl[_0x2146cf(0x168)]();break;default:console['log'](_0x2146cf(0x140)),displayBackups();}});}function restoreBackup(_0x3818e8){const _0x244323=_0x2e84c0;if(_0x3818e8['length']===0x0){console[_0x244323(0x14a)](_0x244323(0x14d)),displayBackups();return;}rl[_0x244323(0x18b)](_0x244323(0x156),_0x7cbff8=>{const _0x5dec7a=_0x244323;if(_0x7cbff8[_0x5dec7a(0x185)]()==='Q'){displayBackups();return;}const _0x16bfb4=parseInt(_0x7cbff8);if(isNaN(_0x16bfb4)||_0x16bfb4<0x0||_0x16bfb4>=_0x3818e8[_0x5dec7a(0x190)]){console[_0x5dec7a(0x14a)](_0x5dec7a(0x142)),displayBackups();return;}const _0x19eaca=_0x3818e8[_0x16bfb4];rl[_0x5dec7a(0x18b)](_0x5dec7a(0x172)+_0x19eaca['date']+_0x5dec7a(0x153),_0x4d9c8e=>{const _0x4e8804=_0x5dec7a;if(_0x4d9c8e['toUpperCase']()!==_0x4e8804(0x16a)&&_0x4d9c8e[_0x4e8804(0x185)]()!=='O'){console[_0x4e8804(0x14a)](_0x4e8804(0x151)),displayBackups();return;}try{const _0x2d32ea=path[_0x4e8804(0x14c)](BACKUP_DIR,_0x19eaca[_0x4e8804(0x16e)]),_0xda1ba4=path['join'](_0x2d32ea,_0x4e8804(0x177)),_0x4a61f7=JSON[_0x4e8804(0x139)](fs[_0x4e8804(0x15f)](_0xda1ba4,_0x4e8804(0x12f)));for(const _0x453646 of _0x4a61f7[_0x4e8804(0x144)]){const _0x31df90=path['join'](_0x2d32ea,path[_0x4e8804(0x148)](_0x453646));if(fs[_0x4e8804(0x17f)](_0x31df90)){const _0x2ae452=path[_0x4e8804(0x14c)](projectDir,_0x453646),_0x207608=path['dirname'](_0x2ae452);!fs['existsSync'](_0x207608)&&fs['mkdirSync'](_0x207608,{'recursive':!![]}),fs[_0x4e8804(0x17a)](_0x31df90,_0x2ae452),console['log'](_0x4e8804(0x17c)+_0x453646);}}console[_0x4e8804(0x14a)](_0x4e8804(0x162)),displayBackups();}catch(_0x4ecd18){console[_0x4e8804(0x182)](_0x4e8804(0x150)+_0x4ecd18['message']+'\x0a'),displayBackups();}});});}function deleteBackup(_0x497a8c){const _0x540472=_0x2e84c0;if(_0x497a8c[_0x540472(0x190)]===0x0){console['log'](_0x540472(0x167)),displayBackups();return;}rl[_0x540472(0x18b)](_0x540472(0x13c),_0x255411=>{const _0x3f123=_0x540472;if(_0x255411[_0x3f123(0x185)]()==='Q'){displayBackups();return;}const _0x50778f=parseInt(_0x255411);if(isNaN(_0x50778f)||_0x50778f<0x0||_0x50778f>=_0x497a8c['length']){console[_0x3f123(0x14a)](_0x3f123(0x142)),displayBackups();return;}const _0x2b9807=_0x497a8c[_0x50778f];rl[_0x3f123(0x18b)](_0x3f123(0x154)+_0x2b9807[_0x3f123(0x193)]+_0x3f123(0x153),_0x1cbb5c=>{const _0x28e4e0=_0x3f123;if(_0x1cbb5c[_0x28e4e0(0x185)]()!==_0x28e4e0(0x16a)&&_0x1cbb5c['toUpperCase']()!=='O'){console[_0x28e4e0(0x14a)](_0x28e4e0(0x16f)),displayBackups();return;}try{const _0xa299e9=path[_0x28e4e0(0x14c)](BACKUP_DIR,_0x2b9807['folder']);fs['rmSync'](_0xa299e9,{'recursive':!![],'force':!![]}),console[_0x28e4e0(0x14a)](_0x28e4e0(0x171)),displayBackups();}catch(_0x5e6197){console[_0x28e4e0(0x182)](_0x28e4e0(0x147)+_0x5e6197[_0x28e4e0(0x180)]+'\x0a'),displayBackups();}});});}function deleteAllBackups(){const _0x47fc1c=_0x2e84c0;rl['question'](_0x47fc1c(0x136),_0xd612e5=>{const _0x360f45=_0x47fc1c;if(_0xd612e5['toUpperCase']()!==_0x360f45(0x16a)&&_0xd612e5[_0x360f45(0x185)]()!=='O'){console[_0x360f45(0x14a)]('\x0aSuppression\x20annulée.\x0a'),displayBackups();return;}rl[_0x360f45(0x18b)](_0x360f45(0x15d),_0x2ddfb5=>{const _0xfdaa22=_0x360f45;if(_0x2ddfb5!==_0xfdaa22(0x16c)){console[_0xfdaa22(0x14a)]('\x0aSuppression\x20annulée.\x0a'),displayBackups();return;}try{fs[_0xfdaa22(0x17f)](BACKUP_DIR)&&(fs[_0xfdaa22(0x192)](BACKUP_DIR,{'recursive':!![],'force':!![]}),fs[_0xfdaa22(0x15c)](BACKUP_DIR,{'recursive':!![]})),console[_0xfdaa22(0x14a)](_0xfdaa22(0x163)),displayBackups();}catch(_0x244b58){console[_0xfdaa22(0x182)](_0xfdaa22(0x147)+_0x244b58[_0xfdaa22(0x180)]+'\x0a'),displayBackups();}});});}displayBackups();
@@ -1,131 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require('fs');
4
- const path = require('path');
5
- const { execSync } = require('child_process');
6
-
7
- /**
8
- * Gestionnaire de dépendances AndroidX/Material Design pour le builder
9
- * Télécharge et extrait les AAR (Android Archive) pour les ajouter à la compilation
10
- */
11
-
12
- const projectDir = process.argv[2] || process.cwd();
13
- const buildDir = path.join(projectDir, 'build');
14
- const libsDir = path.join(buildDir, 'libs');
15
-
16
- // Créer le répertoire des libs
17
- if (!fs.existsSync(libsDir)) {
18
- fs.mkdirSync(libsDir, { recursive: true });
19
- }
20
-
21
- console.log('📦 Configuration des dépendances AndroidX/Material Design\n');
22
-
23
- // Liste des dépendances AndroidX essentielles (URLs des AAR)
24
- const dependencies = [
25
- {
26
- name: 'androidx.appcompat:appcompat:1.6.1',
27
- aar: 'androidx/appcompat/appcompat/1.6.1/appcompat-1.6.1.aar',
28
- local: 'appcompat-1.6.1.aar'
29
- },
30
- {
31
- name: 'com.google.android.material:material:1.9.0',
32
- aar: 'com/google/android/material/material/1.9.0/material-1.9.0.aar',
33
- local: 'material-1.9.0.aar'
34
- },
35
- {
36
- name: 'androidx.core:core:1.10.1',
37
- aar: 'androidx/core/core/1.10.1/core-1.10.1.aar',
38
- local: 'core-1.10.1.aar'
39
- },
40
- {
41
- name: 'androidx.constraintlayout:constraintlayout:2.1.4',
42
- aar: 'androidx/constraintlayout/constraintlayout/2.1.4/constraintlayout-2.1.4.aar',
43
- local: 'constraintlayout-2.1.4.aar'
44
- }
45
- ];
46
-
47
- // Créer un fichier de configuration pour les dépendances
48
- const depsConfig = {
49
- androidx: true,
50
- libraries: dependencies.map(d => ({
51
- name: d.name,
52
- type: 'aar',
53
- local: path.join(libsDir, d.local),
54
- classes: path.join(libsDir, d.local.replace('.aar', '.jar'))
55
- }))
56
- };
57
-
58
- const configPath = path.join(buildDir, 'dependencies.json');
59
- fs.writeFileSync(configPath, JSON.stringify(depsConfig, null, 2), 'utf-8');
60
-
61
- console.log('✓ Configuration des dépendances créée:', configPath);
62
- console.log('');
63
- console.log('Dépendances configurées:');
64
- depsConfig.libraries.forEach(lib => {
65
- console.log(` - ${lib.name}`);
66
- });
67
-
68
- console.log('\n💡 Note: Les bibliothèques AAR seront téléchargées lors du premier build');
69
- console.log(' ou vous pouvez les placer manuellement dans:', libsDir);
70
-
71
- // Créer un script helper pour extraire les JAR des AAR
72
- const extractScript = `#!/bin/bash
73
- # Extrait les fichiers classes.jar de tous les AAR dans le répertoire libs
74
-
75
- LIBS_DIR="\${1:-.}"
76
-
77
- for aar in "\$LIBS_DIR"/*.aar; do
78
- if [ -f "\$aar" ]; then
79
- jar_name="\$(basename "\$aar" .aar).jar"
80
- jar_path="\$LIBS_DIR/\$jar_name"
81
-
82
- echo "Extraction de \$aar..."
83
- unzip -q -o "\$aar" "classes.jar" -d "\$LIBS_DIR/.tmp"
84
-
85
- if [ -f "\$LIBS_DIR/.tmp/classes.jar" ]; then
86
- mv "\$LIBS_DIR/.tmp/classes.jar" "\$jar_path"
87
- echo "✓ Extrait: \$jar_path"
88
- fi
89
- fi
90
- done
91
-
92
- rm -rf "\$LIBS_DIR/.tmp"
93
- echo "Extraction terminée"
94
- `;
95
-
96
- const extractScriptPath = path.join(buildDir, 'extract-aar.sh');
97
- fs.writeFileSync(extractScriptPath, extractScript, 'utf-8');
98
-
99
- console.log('\n✓ Script d\'extraction des AAR créé');
100
-
101
- // Créer un fichier d'aide pour Maven
102
- const mavenSettings = `<?xml version="1.0" encoding="UTF-8"?>
103
- <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
104
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
105
- xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
106
- http://maven.apache.org/xsd/settings-1.0.0.xsd">
107
- <repositories>
108
- <repository>
109
- <id>google</id>
110
- <url>https://maven.google.com/</url>
111
- </repository>
112
- <repository>
113
- <id>central</id>
114
- <url>https://repo.maven.apache.org/maven2</url>
115
- </repository>
116
- </repositories>
117
- </settings>
118
- `;
119
-
120
- const mavenSettingsPath = path.join(buildDir, 'maven-settings.xml');
121
- fs.writeFileSync(mavenSettingsPath, mavenSettings, 'utf-8');
122
-
123
- console.log('✓ Configuration Maven créée:', mavenSettingsPath);
124
-
125
- module.exports = {
126
- depsConfig,
127
- libsDir,
128
- dependencies
129
- };
130
-
131
- console.log('\n✅ Configuration AndroidX/Material Design terminée');
@@ -1,20 +0,0 @@
1
- const {execFileSync} = require("child_process");
2
- const path = require("path");
3
-
4
- function signExe(exePath, certPath, password) {
5
- const signtool = path.join(__dirname, "vendor", "signtool", "signtool.exe");
6
-
7
- const args = [
8
- "sign",
9
- "/f", certPath, // .pfx
10
- "/p", password,
11
- "/fd", "SHA256",
12
- "/tr", "http://timestamp.sectigo.com", // timestamping
13
- "/td", "SHA256",
14
- exePath
15
- ];
16
-
17
- execFileSync(signtool, args, {stdio: "inherit"});
18
- }
19
-
20
- module.exports = { signExe };