@@ -361,7 +361,7 @@ export class AndroidPluginBuildService implements IAndroidPluginBuildService {
361
361
this . $fs . copyFile ( path . join ( dir , "*" ) , destination ) ;
362
362
}
363
363
}
364
- private extractNamespaceFromManifest ( manifestPath :string ) : string {
364
+ private extractNamespaceFromManifest ( manifestPath : string ) : string {
365
365
const fileContent = this . $fs . readText ( manifestPath ) ;
366
366
const contentRegex = new RegExp ( 'package="(.*?)"' ) ;
367
367
const match = fileContent . match ( contentRegex ) ;
@@ -394,10 +394,7 @@ export class AndroidPluginBuildService implements IAndroidPluginBuildService {
394
394
if ( this . $projectData . nsConfig . android . gradleVersion ) {
395
395
gradleVersion = this . $projectData . nsConfig . android . gradleVersion ;
396
396
}
397
- this . replaceGradleVersion (
398
- pluginTempDir ,
399
- gradleVersion
400
- ) ;
397
+ this . replaceGradleVersion ( pluginTempDir , gradleVersion ) ;
401
398
402
399
this . replaceGradleAndroidPluginVersion (
403
400
buildGradlePath ,
@@ -407,13 +404,19 @@ export class AndroidPluginBuildService implements IAndroidPluginBuildService {
407
404
// In gradle 8 every android project must have a namespace in "android"
408
405
// and the package property in manifest is now forbidden
409
406
// let s replace it
410
- const manifestFilePath = this . getManifest ( path . join ( pluginTempDir , 'src' , 'main' ) ) ;
407
+ const manifestFilePath = this . getManifest (
408
+ path . join ( pluginTempDir , "src" , "main" )
409
+ ) ;
411
410
let pluginNamespace = this . extractNamespaceFromManifest ( manifestFilePath ) ;
412
411
if ( ! pluginNamespace ) {
413
- pluginNamespace = pluginName . replace ( / @ / g, '' ) . replace ( / [ / - ] / g, '.' )
412
+ pluginNamespace = pluginName . replace ( / @ / g, "" ) . replace ( / [ / - ] / g, "." ) ;
414
413
}
415
414
416
- this . replaceFileContent ( buildGradlePath , "{{pluginNamespace}}" , pluginNamespace ) ;
415
+ this . replaceFileContent (
416
+ buildGradlePath ,
417
+ "{{pluginNamespace}}" ,
418
+ pluginNamespace
419
+ ) ;
417
420
this . replaceFileContent ( buildGradlePath , "{{pluginName}}" , pluginName ) ;
418
421
this . replaceFileContent ( settingsGradlePath , "{{pluginName}}" , pluginName ) ;
419
422
}
@@ -779,9 +782,11 @@ export class AndroidPluginBuildService implements IAndroidPluginBuildService {
779
782
`-PappResourcesPath=${ this . $projectData . getAppResourcesDirectoryPath ( ) } ` ,
780
783
] ;
781
784
if ( pluginBuildSettings . gradleArgs ) {
782
- const additionalArgs : string [ ] = [ ]
783
- pluginBuildSettings . gradleArgs . forEach ( arg => {
784
- additionalArgs . push ( ...arg . split ( ' -P' ) . map ( ( a , i ) => i === 0 ? a : `-P${ a } ` ) ) ;
785
+ const additionalArgs : string [ ] = [ ] ;
786
+ pluginBuildSettings . gradleArgs . forEach ( ( arg ) => {
787
+ additionalArgs . push (
788
+ ...arg . split ( " -P" ) . map ( ( a , i ) => ( i === 0 ? a : `-P${ a } ` ) )
789
+ ) ;
785
790
} ) ;
786
791
localArgs . push ( ...additionalArgs ) ;
787
792
}
0 commit comments