-
-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathSentry_Android_UPL.xml
More file actions
201 lines (184 loc) · 8.86 KB
/
Sentry_Android_UPL.xml
File metadata and controls
201 lines (184 loc) · 8.86 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
<init>
<log text="Sentry SDK Android UPL initialization"/>
<setBoolFromProperty result="bUploadSymbolsAutomatically" ini="Engine" section="/Script/Sentry.SentrySettings" property="UploadSymbolsAutomatically" default="false" />
<setBoolFromProperty result="bIncludeSources" ini="Engine" section="/Script/Sentry.SentrySettings" property="IncludeSources" default="false" />
<setBoolFromProperty result="bUseLegacyGradlePlugin" ini="Engine" section="/Script/Sentry.SentrySettings" property="UseLegacyGradlePlugin" default="false" />
<setStringFromProperty result="enabledBuildConfigurations" ini="Engine" section="/Script/Sentry.SentrySettings" property="EnableBuildConfigurations" default=""/>
<setStringFromProperty result="enabledBuildTargetTypes" ini="Engine" section="/Script/Sentry.SentrySettings" property="EnableBuildTargets" default=""/>
<setBoolContains result="bCurrentConfigurationDisabled" source="$S(enabledBuildConfigurations)" find="bEnable$S(Configuration)=False"/>
<setBool result="bSkipUpload" value="$B(bCurrentConfigurationDisabled)"/>
<if condition="bSkipUpload">
<true>
<setBool result="bUploadSymbols" value="false"/>
</true>
<false>
<setBool result="bUploadSymbols" value="$B(bUploadSymbolsAutomatically)"/>
</false>
</if>
</init>
<prebuildCopies>
<copyDir src="$S(PluginDir)/Private/Android/Java" dst="$S(BuildDir)/src/io/sentry/unreal" />
<copyFile src="$S(PluginDir)/../ThirdParty/Android/sentry.jar" dst="$S(BuildDir)/gradle/app/libs/sentry.jar" />
<copyFile src="$S(PluginDir)/../ThirdParty/Android/sentry-android-core-release.aar" dst="$S(BuildDir)/gradle/app/libs/sentry-android-core-release.aar" />
<copyFile src="$S(PluginDir)/../ThirdParty/Android/sentry-android-ndk-release.aar" dst="$S(BuildDir)/gradle/app/libs/sentry-android-ndk-release.aar" />
<copyFile src="$S(PluginDir)/../ThirdParty/Android/sentry-native-ndk-release.aar" dst="$S(BuildDir)/gradle/app/libs/sentry-native-ndk-release.aar" />
<if condition="bUploadSymbols">
<true>
<copyFile src="$S(ProjectDir)/sentry.properties" dst="$S(BuildDir)/gradle/sentry.properties" />
<copyFile src="$S(ProjectDir)/sentry.properties" dst="$S(BuildDir)/gradle/AFSProject/app/sentry.properties" />
</true>
</if>
<if condition="bUseLegacyGradlePlugin">
<false>
<log text="Modifying engine's Gradle version used by replacing gradle-wrapper.properties"/>
<copyFile src="$S(PluginDir)/../../Gradle/gradle-wrapper.properties" dst="$S(BuildDir)/gradle/gradle/wrapper/gradle-wrapper.properties" />
</false>
</if>
</prebuildCopies>
<androidManifestUpdates>
<addElements tag="application">
<meta-data android:name="io.sentry.auto-init" android:value="false"/>
<meta-data android:name="io.sentry.sdk.name" android:value="sentry.java.android.unreal"/>
<meta-data android:name="io.sentry.ndk.scope-sync.enable" android:value="true"/>
</addElements>
</androidManifestUpdates>
<gradleProperties>
<insert>
android.useAndroidX=true
android.enableJetifier=true
android.jetifier.ignorelist=epitaph
</insert>
</gradleProperties>
<proguardAdditions>
<insert>
-dontwarn android.app.ApplicationStartInfo
-dontwarn io.sentry.unreal.**
-keep class io.sentry.** { *; }
-keep interface io.sentry.** { *; }
</insert>
</proguardAdditions>
<buildGradleAdditions>
<if condition="bUploadSymbols">
<true>
<insert>
apply plugin: 'io.sentry.android.gradle'
sentry {
uploadNativeSymbols = true
}
</insert>
<if condition="bUseLegacyGradlePlugin">
<false>
<insert>
sentry {
autoInstallation {
enabled = false
}
}
</insert>
</false>
</if>
<if condition="bIncludeSources">
<true>
<insert>
sentry {
includeNativeSources = true
}
</insert>
</true>
</if>
</true>
</if>
</buildGradleAdditions>
<buildGradleAdditions>
<insert>
android {
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
aidl true
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'])
implementation "com.abovevacant:epitaph:0.1.0"
}
repositories {
mavenCentral()
}
</insert>
</buildGradleAdditions>
<baseBuildGradleAdditions>
<insert>
allprojects {
def mappings = [
'android.arch.lifecycle.Lifecycle': 'androidx.lifecycle.Lifecycle',
'android.arch.lifecycle.LifecycleObserver': 'androidx.lifecycle.LifecycleObserver',
'android.arch.lifecycle.OnLifecycleEvent': 'androidx.lifecycle.OnLifecycleEvent',
'android.arch.lifecycle.ProcessLifecycleOwner': 'androidx.lifecycle.ProcessLifecycleOwner',
'android.arch.lifecycle': 'androidx.lifecycle',
'android.support.annotation': 'androidx.annotation',
'android.support.v13.app.FragmentCompat': 'androidx.legacy.app.FragmentCompat',
'android.support.v4.app.ActivityCompat': 'androidx.core.app.ActivityCompat',
'android.support.v4.app.NotificationCompat': 'androidx.core.app.NotificationCompat',
'android.support.v4.app.NotificationManagerCompat': 'androidx.core.app.NotificationManagerCompat',
'android.support.v4.content.ContextCompat': 'androidx.core.content.ContextCompat',
'android.support.v4.content.FileProvider': 'androidx.core.content.FileProvider',
]
beforeEvaluate { project ->
project.rootProject.projectDir.traverse(type: groovy.io.FileType.FILES, nameFilter: ~/.*\.java$/) { f ->
mappings.each { entry ->
if (f.getText('UTF-8').contains(entry.key)) {
println "Updating ${entry.key} to ${entry.value} in file ${f}"
ant.replace(file: f, token: entry.key, value: entry.value)
}
}
}
}
}
</insert>
</baseBuildGradleAdditions>
<buildscriptGradleAdditions>
<if condition="bUseLegacyGradlePlugin">
<true>
<insert>
dependencies {
classpath 'com.android.tools.build:gradle:3.5.4'
}
</insert>
</true>
<false>
<insert>
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
}
</insert>
</false>
</if>
<if condition="bUploadSymbols">
<true>
<if condition="bUseLegacyGradlePlugin">
<true>
<log text="Using legacy Sentry Gradle plugin for Android debug symbol upload."/>
<insert>
dependencies {
classpath 'io.sentry:sentry-android-gradle-plugin:2.1.5' // legacy
}
</insert>
</true>
<false>
<log text="Using Sentry Gradle plugin for Android debug symbol upload."/>
<insert>
dependencies {
classpath 'io.sentry:sentry-android-gradle-plugin:6.1.0' // current
}
</insert>
</false>
</if>
</true>
</if>
</buildscriptGradleAdditions>
</root>