Skip to content

Commit

Permalink
all: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
OxygenCobalt committed Dec 23, 2024
1 parent 07118a5 commit 77f97ef
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ plugins {
id 'com.android.library' version "$agp_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
// We use spotless in the root build.gradle to apply to all module
id "com.diffplug.spotless" version "6.25.0" apply true
}

Expand Down
10 changes: 5 additions & 5 deletions musikr/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ set_target_properties(
${taglib_file_path}
INTERFACE_INCLUDE_DIRECTORIES
${taglib_include})

add_library(${CMAKE_PROJECT_NAME} SHARED
# List C/C++ source files with relative paths to this CMakeLists.txt.
taglib_jni.cpp
JVMInputStream.cpp
JVMTagMap.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
# taglib + jni shim shared library. Kudos to them.
# https://github.com/taglib/taglib/issues/1212#issuecomment-2326456903
LINK_FLAGS
"-Wl,--exclude-libs,ALL")
# Additionally, enable 16kb page size. I believe taglib can support this fine,
# 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
# can link libraries from various origins, such as libraries defined in this
Expand All @@ -64,4 +64,4 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
# List libraries link to the target library
PRIVATE android
PRIVATE log
PRIVATE taglib)
PRIVATE taglib)
3 changes: 1 addition & 2 deletions musikr/src/main/cpp/JVMInputStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <cmath>

// TODO: Handle stream exceptions

JVMInputStream::JVMInputStream(JNIEnv *env, jobject inputStream) : env(env), inputStream(
inputStream) {
if (!env->IsInstanceOf(inputStream,
Expand Down Expand Up @@ -106,7 +105,7 @@ void JVMInputStream::seek(TagLib::offset_t offset, Position p) {
}

void JVMInputStream::clear() {
// Nothing to do
// Nothing to do
}

TagLib::offset_t JVMInputStream::tell() const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package org.oxycblt.musikr.metadata

import android.content.Context
import android.os.ParcelFileDescriptor
import java.io.FileInputStream
import kotlinx.coroutines.Dispatchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package org.oxycblt.musikr.metadata

import android.content.Context
import java.io.FileInputStream

internal object TagLibJNI {
Expand Down

0 comments on commit 77f97ef

Please sign in to comment.