Skip to content

Commit

Permalink
Merge pull request #4555 from Isira-Seneviratne/KSP
Browse files Browse the repository at this point in the history
chore: Migrate to KSP
  • Loading branch information
Isira-Seneviratne authored Aug 20, 2023
2 parents 4dc18cb + f69f835 commit 2b33de7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
11 changes: 5 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import java.time.Instant

plugins {
id 'com.android.application'
id 'com.google.devtools.ksp'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlinx-serialization'
id 'kotlin-parcelize'
}
Expand All @@ -20,10 +20,9 @@ android {
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
resValue "string", "app_name", "LibreTube"

javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
}
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
arg("exportSchema", "true")
}
}

Expand Down Expand Up @@ -126,7 +125,7 @@ dependencies {
implementation libs.coil

/* Room */
kapt libs.room.compiler
ksp libs.room.compiler
implementation libs.room
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import kotlinx.serialization.Serializable
@Entity(tableName = "subscriptionGroups")
data class SubscriptionGroup(
@PrimaryKey var name: String,
val channels: MutableList<String>
var channels: List<String>
)
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SubscriptionGroupChannelsAdapter(
channelIncluded.setOnCheckedChangeListener(null)
channelIncluded.isChecked = group.channels.contains(channelId)
channelIncluded.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) group.channels.add(channelId) else group.channels.remove(channelId)
if (isChecked) group.channels += channelId else group.channels -= channelId
onGroupChanged(group)
}
}
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ buildscript {
}
}

plugins {
id 'com.google.devtools.ksp' version '1.9.0-1.0.12' apply false
}

task clean(type: Delete) {
delete rootProject.buildDir
}

0 comments on commit 2b33de7

Please sign in to comment.