hi, anybody using ormlite in an compose desktop application and have success making a release build?
with the following code it works fine in debug and even with runDistributable, but if I choose packageReleaseDmg for example the code hangs on connectionSource.getReadWriteConnection(“”) line - if i disable proguard it works, all ormlite/jdbc packages I can find to be used has been excluded in proguard config file
Copy code
val dbFolder = File(applicationFolder, DesktopConfiguration.DATABASE_FOLDER_NAME)
dbFolder.mkdirs()
val dbFile = File(dbFolder, DesktopConfiguration.DATABASE_NAME)
val dbConnectionString = "jdbc:sqlite:${dbFile.absolutePath}"
connectionSource = JdbcConnectionSource(dbConnectionString)
val conn = connectionSource.getReadWriteConnection("")
val dbVersion = conn.queryForLong("PRAGMA user_version;")
Logger.i(TAG, "Database filesystem path: ${dbFile.absolutePath}")
Logger.i(TAG, "Database current version: $dbVersion")
k
Kirill Grouchnikov
11/27/2023, 5:26 PM
Doesn’t sound like a Compose question, but rather an ormlite / proguard configuration question that perhaps is better suited to ask at ormlite forums or stack overflow