Skip to content

Revert "command line lint is broke for RestrictTo LIBRARY_GROUP, so suppress lint warnings for now" #931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.ccci.gto.android.common.db

import android.annotation.SuppressLint
import android.database.Cursor
import android.database.sqlite.SQLiteDatabase
import androidx.annotation.RestrictTo
Expand Down Expand Up @@ -112,9 +111,7 @@ inline fun <reified T : Any> Dao.find(vararg key: Any) = find(T::class.java, *ke
inline fun <T : Any> Query<T>.get(dao: Dao) = dao.get(this)
inline fun Query<*>.getCursor(dao: Dao) = dao.getCursor(this)

@SuppressLint("RestrictedApi")
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
inline fun <reified T : Any> Dao.getService() = getService(T::class.java)
@SuppressLint("RestrictedApi")
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
inline fun <reified T : Any> Dao.getService(noinline defaultValue: () -> T) = getService(T::class.java, defaultValue)
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package org.ccci.gto.android.common.db

import android.annotation.SuppressLint
import android.os.Parcelable
import androidx.annotation.RestrictTo
import kotlinx.parcelize.IgnoredOnParcel
import kotlinx.parcelize.Parcelize

@Parcelize
@SuppressLint("SupportAnnotationUsage")
data class Join<S : Any, T : Any> private constructor(
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) val target: Table<T>,
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) val base: Join<S, *>? = null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package org.ccci.gto.android.common.db

import android.annotation.SuppressLint
import androidx.annotation.RestrictTo
import androidx.annotation.VisibleForTesting
import org.ccci.gto.android.common.db.AbstractDao.Companion.bindValues

@SuppressLint("SupportAnnotationUsage")
data class Query<T : Any> private constructor(
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
val table: Table<T>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package org.ccci.gto.android.common.db

import android.annotation.SuppressLint
import android.os.Parcelable
import androidx.annotation.RestrictTo
import kotlinx.parcelize.IgnoredOnParcel
import kotlinx.parcelize.Parcelize

@Parcelize
@SuppressLint("SupportAnnotationUsage")
data class Table<T : Any> internal constructor(
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) val type: Class<T>,
private val alias: String? = null,
Expand Down
Loading