all: cleanup

This commit is contained in:
Alexander Capehart 2024-12-23 11:04:51 -05:00
parent 07118a5ff1
commit 77f97ef656
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
5 changed files with 7 additions and 9 deletions

View file

@ -31,6 +31,7 @@ plugins {
id 'com.android.library' version "$agp_version" apply false id 'com.android.library' version "$agp_version" apply false
id "org.jetbrains.kotlin.android" version "$kotlin_version" apply false id "org.jetbrains.kotlin.android" version "$kotlin_version" apply false
id "com.google.devtools.ksp" version '2.0.21-1.0.25' apply false id "com.google.devtools.ksp" version '2.0.21-1.0.25' apply false
// We use spotless in the root build.gradle to apply to all module
id "com.diffplug.spotless" version "6.25.0" apply true id "com.diffplug.spotless" version "6.25.0" apply true
} }

View file

@ -42,7 +42,6 @@ set_target_properties(
${taglib_file_path} ${taglib_file_path}
INTERFACE_INCLUDE_DIRECTORIES INTERFACE_INCLUDE_DIRECTORIES
${taglib_include}) ${taglib_include})
add_library(${CMAKE_PROJECT_NAME} SHARED add_library(${CMAKE_PROJECT_NAME} SHARED
# List C/C++ source files with relative paths to this CMakeLists.txt. # List C/C++ source files with relative paths to this CMakeLists.txt.
taglib_jni.cpp taglib_jni.cpp
@ -50,12 +49,13 @@ add_library(${CMAKE_PROJECT_NAME} SHARED
JVMTagMap.cpp JVMTagMap.cpp
JVMMetadataBuilder.cpp JVMMetadataBuilder.cpp
) )
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES target_link_options(${CMAKE_PROJECT_NAME}
# @Tolriq found that these flags can reduce the size of the linked # @Tolriq found that these flags can reduce the size of the linked
# taglib + jni shim shared library. Kudos to them. # taglib + jni shim shared library. Kudos to them.
# https://github.com/taglib/taglib/issues/1212#issuecomment-2326456903 # https://github.com/taglib/taglib/issues/1212#issuecomment-2326456903
LINK_FLAGS # Additionally, enable 16kb page size. I believe taglib can support this fine,
"-Wl,--exclude-libs,ALL") # as a cursory glance indicates that it doesn't hardcode any page sizes.
PRIVATE "-Wl,--exclude-libs,ALL,-z,max-page-size=16384")
# Specifies libraries CMake should link to your target library. You # Specifies libraries CMake should link to your target library. You
# can link libraries from various origins, such as libraries defined in this # can link libraries from various origins, such as libraries defined in this
@ -64,4 +64,4 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
# List libraries link to the target library # List libraries link to the target library
PRIVATE android PRIVATE android
PRIVATE log PRIVATE log
PRIVATE taglib) PRIVATE taglib)

View file

@ -21,7 +21,6 @@
#include <cmath> #include <cmath>
// TODO: Handle stream exceptions // TODO: Handle stream exceptions
JVMInputStream::JVMInputStream(JNIEnv *env, jobject inputStream) : env(env), inputStream( JVMInputStream::JVMInputStream(JNIEnv *env, jobject inputStream) : env(env), inputStream(
inputStream) { inputStream) {
if (!env->IsInstanceOf(inputStream, if (!env->IsInstanceOf(inputStream,
@ -106,7 +105,7 @@ void JVMInputStream::seek(TagLib::offset_t offset, Position p) {
} }
void JVMInputStream::clear() { void JVMInputStream::clear() {
// Nothing to do // Nothing to do
} }
TagLib::offset_t JVMInputStream::tell() const { TagLib::offset_t JVMInputStream::tell() const {

View file

@ -18,7 +18,6 @@
package org.oxycblt.musikr.metadata package org.oxycblt.musikr.metadata
import android.content.Context
import android.os.ParcelFileDescriptor import android.os.ParcelFileDescriptor
import java.io.FileInputStream import java.io.FileInputStream
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers

View file

@ -18,7 +18,6 @@
package org.oxycblt.musikr.metadata package org.oxycblt.musikr.metadata
import android.content.Context
import java.io.FileInputStream import java.io.FileInputStream
internal object TagLibJNI { internal object TagLibJNI {