Skip to content
Merged
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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android.nonTransitiveRClass=true

# maven publish
GROUP=io.github.peerless2012
VERSION_NAME=0.3.0-rc02
VERSION_NAME=0.3.0-rc03

POM_URL=https://github.com/peerless2012/libass-android
POM_INCEPTION_YEAR=2025
Expand Down
14 changes: 7 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[versions]
agp = "8.10.1"
kotlin = "2.1.20"
agp = "8.12.0"
kotlin = "2.2.0"
coreKtx = "1.16.0"
annotation = "1.9.1"
annotation-experimental = "1.5.0"
annotation-experimental = "1.5.1"
junit = "4.13.2"
junitVersion = "1.2.1"
espressoCore = "3.6.1"
junitVersion = "1.3.0"
espressoCore = "3.7.0"
appcompat = "1.7.1"
material = "1.12.0"
activity = "1.10.1"
constraintlayout = "2.2.1"
media3 = "1.8.0-beta01"
publish = "0.31.0"
media3 = "1.8.0"
publish = "0.34.0"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
Expand Down
5 changes: 2 additions & 3 deletions lib_ass/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.vanniktech.maven.publish.SonatypeHost
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary

plugins {
Expand All @@ -9,7 +8,7 @@ plugins {

android {
namespace = "io.github.peerless2012.ass"
compileSdk = 35
compileSdk = 36
ndkVersion = "28.1.13356709"

defaultConfig {
Expand Down Expand Up @@ -74,7 +73,7 @@ dependencies {
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
publishToMavenCentral()
// https://vanniktech.github.io/gradle-maven-publish-plugin/what/
configure(AndroidSingleVariantLibrary())
signAllPublications()
Expand Down
5 changes: 2 additions & 3 deletions lib_ass_kt/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.vanniktech.maven.publish.SonatypeHost
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary

plugins {
Expand All @@ -9,7 +8,7 @@ plugins {

android {
namespace = "io.github.peerless2012.ass.kt"
compileSdk = 35
compileSdk = 36
ndkVersion = "28.1.13356709"

defaultConfig {
Expand Down Expand Up @@ -69,7 +68,7 @@ dependencies {
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
publishToMavenCentral()
// https://vanniktech.github.io/gradle-maven-publish-plugin/what/
configure(AndroidSingleVariantLibrary())
signAllPublications()
Expand Down
5 changes: 2 additions & 3 deletions lib_ass_media/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.vanniktech.maven.publish.SonatypeHost
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary

plugins {
Expand All @@ -9,7 +8,7 @@ plugins {

android {
namespace = "io.github.peerless2012.exo"
compileSdk = 35
compileSdk = 36

defaultConfig {
minSdk = 21
Expand Down Expand Up @@ -50,7 +49,7 @@ dependencies {
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
publishToMavenCentral()
// https://vanniktech.github.io/gradle-maven-publish-plugin/what/
configure(AndroidSingleVariantLibrary())
signAllPublications()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.github.peerless2012.ass.media.parser

import androidx.media3.common.Format
import androidx.media3.common.MediaLibraryInfo
import androidx.media3.common.text.Cue
import androidx.media3.common.util.Consumer
import androidx.media3.common.util.UnstableApi
Expand Down Expand Up @@ -51,13 +50,9 @@ abstract class AssSubtitleParser(
frames?.images?.let { texts ->
texts.forEach { tex ->
tex.bitmap?.let { bitmap ->
val cueBuilder = Cue.Builder()
// For users use stable media3
if (MediaLibraryInfo.VERSION_INT > 1_008_000_0_00) {
cueBuilder.setZIndex(event.layer)
}
val cue = cueBuilder
val cue = Cue.Builder()
.setBitmap(bitmap)
.setZIndex(event.layer)
.setPosition(tex.x / assHandler.videoSize.width.toFloat())
.setPositionAnchor(Cue.ANCHOR_TYPE_START)
.setLine(tex.y / assHandler.videoSize.height.toFloat(), Cue.LINE_TYPE_FRACTION)
Expand Down