https://kotlinlang.org logo
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
benchmarks
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
confetti
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
lincheck
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by
Title
s

spierce7

04/05/2022, 5:08 AM
Does anyone know of a Crash reporting solution that supports proguard / mappings.txt for java?
j

jw

04/05/2022, 5:10 AM
Bugsnag
☝️ 2
s

spierce7

04/05/2022, 5:25 AM
@jw Does bugsnag support proguard mappings for normal java apps? I’ve been looking at their documentation and I haven’t found anything. Only Android.
j

jw

04/05/2022, 5:26 AM
I can double check in the morning. We use it for a bunch of Java things
👍 2
a

Asapha

04/05/2022, 10:07 AM
@spierce7 It works with Sentry for sure. You use their CLI to upload your mapping, this generates an id which has to be sent with each error event. They recently improved how this id is bundled/retrieved in the app: https://github.com/getsentry/sentry-java/issues/1236 So for each release you’d do: run Proguard -> upload the mappings.txt to Sentry -> bundle a resource file with the id
👍 1
☝️ 2
t

Thomas

04/05/2022, 4:59 PM
I asked Bugsnag support and they told me that it is only supported for Android.
I need a crash reporting tool soon. Currently looking into Sentry which looks promising.
Sentry seems to be working with R8 for me. However, I did need to add
-keep class io.sentry.** { *; }
rule in order to work around the error
Discarded unknown attribute
.
j

jw

04/05/2022, 10:10 PM
Surely you can use a more targeted rule than that
:yes: 1
t

Thomas

04/05/2022, 11:00 PM
Well I checked the source code and it seems they are using gson all over the place. So lots of rules would be needed. But for me replacing
keep
with
keepclassmembers
does the trick too. Actually the rule I mentioned in my previous comment is the rule they use on Android 🤔
j

jw

04/06/2022, 1:16 AM
Well they're also doing it wrong on Android and as an SDK should strive to ship minimal rules. That existing rule says they don't really care.
2
t

Thomas

04/06/2022, 12:16 PM
Yes I completely agree. It seems that with sentry java 6.0.0-alpha.4 they dropped GSON and do manual parsing, so no rules are needed anymore!
🙂 1
s

spierce7

04/07/2022, 8:24 PM
@Asapha thanks for the recommendation. Trying to get it working with them
It’s not as straight forward as I like, but I have a working model in my head I think
t

Thomas

04/07/2022, 11:20 PM
Just create a gradle task to generate a uuid, use compose jvmArgs option to pass it to your app code, and create another gradle task to upload the generated mapping after obfuscation with the uuid generated. That’s how I did it.
s

spierce7

04/08/2022, 12:34 AM
I was planning on hashing the mappings.txt and using that as a UUID
t

Thomas

04/08/2022, 12:50 AM
I guess that could work too. If you look at the source code of their Android gradle plugin you can see that they just generate a new uuid every time.
r

romtsn

05/09/2022, 2:48 PM
hey, roman from sentry here. I think we could unbundle the Sentry Android gradle plugin from AGP, so it would also work for JVM apps. Thomas, would you be up for filing an issue on github describing the way you set it up for your app? (btw, we’ll reduce our proguard rules to the minimum as part of 6.0.0 as well, thanks for the heads up)
🎉 1
a

Alex Styl

11/07/2022, 8:57 AM
@spierce7 were you able to use Sentry on an obfuscated jvm app? if yes, how did you upload the mapping files. I can’t seem to find them in the project
s

spierce7

11/07/2022, 12:35 PM
I remember I found out how. I never got obfuscation working properly though.
There is a way. I think it was through their rest api
a

Alex Styl

11/07/2022, 1:35 PM
I check that there is a cli tool to upload the mappings, but my main issue is where are the mapping files. do i need to run proguard on my own? i see in the documentation that there are tasks that execute obfuscation but there are no mapping files in the build folder after wards
I am talking about the ‘w Proguard’ part of this tutorial
s

spierce7

11/07/2022, 1:36 PM
I believe you can tell proguard where to output the mappings from the command line client. I don't know where they are with the compose tool. I haven't used that. That just came out. You should ask in the main channel
a

Alex Styl

11/07/2022, 1:41 PM
so you used proguard manually?
s

spierce7

11/07/2022, 1:42 PM
not very successfully
a

Alex Styl

11/07/2022, 1:45 PM
I opened an issue on Github for the mapping files. I hope they are there and I missed it somehow
s

spierce7

11/07/2022, 1:45 PM
It seems more likely there is a setting somewhere you aren't configuring
I'd ask in the channel
a

Alex Styl

11/07/2022, 1:46 PM
i have asked in the #compose-desktop channel. that’s the one you mean right? https://kotlinlang.slack.com/archives/C01D6HTPATV/p1667715244225299
a

Asapha

11/07/2022, 1:53 PM
Try to add
-printmapping
in your config file. See https://www.guardsquare.com/manual/configuration/usage
a

Alex Styl

11/07/2022, 2:14 PM
@Asapha it worked! I did
-printmapping mapping.txt
and it generated the mapping file in the location of the
.pro
file. Thanks!