JetBrains / JetBrains/Exposed

Exposed Proguard Problem

Open
#1,377 9 comments 2 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
9.3k
Forks
798
Avg merge
4d 2h
Merged PRs (30d)
26

Description

Hi, I am using IntEntityClass and EntityId in my database class and getting this error while using proguard.

```
Caused by: java.lang.NullPointerException: null
at org.jetbrains.exposed.dao.EntityClass.(EntityClass.kt:18)
at org.jetbrains.exposed.dao.IntEntityClass.(IntEntity.kt:8)
at org.jetbrains.exposed.dao.IntEntityClass.(IntEntity.kt:8)
at myPath.MyClass$Companion.(SourceFile:50)
at myPath.MyClass$Companion.(SourceFile)
at myPath.MyClass.(SourceFile:52)
```

Tried these rules too but didn't seem to solve:

```
-keepclassmembers class myPath.MyClass{
public static ** Companion;
}

-keep class myPath.MyClass$Companion { *; }
-keep class org.jetbrains.** { *; }
-keep interface org.jetbrains.** { *; }
-keep enum org.jetbrains.** { *; }
```

class context ->

```
internal object MyClasses: IntIdTable(Constant.MyCLASS) {
val name = varchar("name", length = 50).uniqueIndex()
}

class MyClass(id: EntityID) : IntEntity(id) {
companion object : IntEntityClass(MyClasses)

var name by MyClasses.name
}
```

I am not sure if problem is totally related to 'Exposed' but i would like to hear your opinions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.