Skip to content

Commit 77142ec

Browse files
committed
Fix issue with AndroidManifest.xml being included
1 parent 223e20f commit 77142ec

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ OneSignalExample/Assets/Plugins/**/*.aar
22
OneSignalExample/Assets/Plugins/**/*.aar.meta
33
OneSignalExample/Assets/Plugins/**/*.jar
44
OneSignalExample/Assets/Plugins/**/*.jar.meta
5+
build.log

buildpackage.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ if [ ! -d $temp_location ]; then
2323
mkdir $temp_location
2424
fi
2525

26-
#removed an unneeded Android manifest
27-
if [[ -e "$config_location/AndroidManifest.xml" ]]; then
26+
# Removed generated Android manifest files
27+
if [[ -e "$config_location/AndroidManifest.xml" ]]; then
2828
rm $config_location/AndroidManifest.xml
2929
fi
30-
3130
if [[ -e "$config_location/AndroidManifest.xml.meta" ]]; then
3231
rm $config_location/AndroidManifest.xml.meta
3332
fi
@@ -48,12 +47,13 @@ mkdir $android_location
4847
mv $temp_location/OneSignalConfig $config_location
4948
mv $temp_location/OneSignalConfig.meta $config_location.meta
5049

51-
error_code=0
52-
53-
#create the .unitypackage
50+
# Create the .unitypackage
5451
echo "Creating unitypackage."
52+
# Setting standalone keeps AndroidManifest.xml from being regenerated
53+
# buildTarget must be before exportPackage for this to work
5554
/Applications/Unity/Unity.app/Contents/MacOS/Unity \
5655
-batchMode \
56+
-buildTarget standalone \
5757
-projectPath $project_path \
5858
-exportPackage Assets $package_name \
5959
-logFile $log_file \

0 commit comments

Comments
 (0)