-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest-release-build.sh
More file actions
executable file
·62 lines (51 loc) · 2.43 KB
/
test-release-build.sh
File metadata and controls
executable file
·62 lines (51 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
echo "🧪 Testing release build with ProGuard for @novastera-oss/llamarn..."
# Build release APK using React Native CLI (which handles bundling correctly)
echo "📦 Building release APK using React Native CLI..."
npx react-native run-android --mode=release
if [ $? -eq 0 ]; then
echo "✅ Release build successful!"
# Check if ProGuard processed the classes
echo "🔍 Checking ProGuard output..."
if [ -f "android/app/build/outputs/mapping/release/mapping.txt" ]; then
echo "✅ ProGuard mapping file found"
# Check if our library classes are preserved
echo "🔍 Checking if library classes are preserved..."
if grep -q "com.novastera.llamarn" android/app/build/outputs/mapping/release/mapping.txt; then
echo "✅ Library classes found in mapping (preserved by ProGuard rules)"
echo "📋 Sample of preserved classes:"
grep "com.novastera.llamarn" android/app/build/outputs/mapping/release/mapping.txt | head -5
else
echo "⚠️ Library classes not found in mapping"
fi
# Check seeds file
if [ -f "android/app/build/outputs/mapping/release/seeds.txt" ]; then
echo "🌱 Checking seeds file..."
if grep -q "com.novastera.llamarn" android/app/build/outputs/mapping/release/seeds.txt; then
echo "✅ Library classes found in seeds (explicitly kept)"
else
echo "⚠️ Library classes not found in seeds"
fi
fi
# Check usage file
if [ -f "android/app/build/outputs/mapping/release/usage.txt" ]; then
echo "🗑️ Checking usage file (removed classes)..."
if grep -q "com.novastera.llamarn" android/app/build/outputs/mapping/release/usage.txt; then
echo "❌ Library classes found in usage (removed by ProGuard)"
else
echo "✅ Library classes not found in usage (preserved)"
fi
fi
else
echo "❌ ProGuard mapping file not found"
fi
# Check APK size
if [ -f "android/app/build/outputs/apk/release/app-release.apk" ]; then
APK_SIZE=$(ls -lh android/app/build/outputs/apk/release/app-release.apk | awk '{print $5}')
echo "📱 Release APK size: $APK_SIZE"
fi
else
echo "❌ Release build failed!"
exit 1
fi
echo "🎉 Release build test completed!"