<commit_before>cmake_minimum_required(VERSION 2.8)
project(ygodeck-android)

find_package(ygodeck-java)

if(CMAKE_BUILD_TYPE MATCHES "[dD]ebug")
    set(APK_TARGET_NAME "android-debug.apk")
    set(GRADLE_TASK "assembleDebug")
else()
    set(APK_TARGET_NAME "android-release.apk")
    set(GRADLE_TASK "assembleRelease")
endif()

################################
# Build apk
################################
file(GLOB_RECURSE ANDROID_SRC ./*.java ./*.xml)

set(APK_PATH "${CMAKE_CURRENT_BINARY_DIR}/build/outputs/apk")
set(APK_TARGETS "${APK_PATH}/${APK_TARGET_NAME}")

add_custom_command(
    COMMAND gradlew -p ${CMAKE_CURRENT_LIST_DIR} --project-cache-dir
    ${CMAKE_CURRENT_BINARY_DIR}/gradle
    -PlibraryPath=${YGODECK-JAVA_JARS}
    -PbuildDir=${CMAKE_CURRENT_BINARY_DIR}/build ${GRADLE_TASK}
    OUTPUT ${APK_TARGETS}
    DEPENDS ${ANDROID_SRC} ${CMAKE_CURRENT_LIST_FILE})

add_custom_target(ygodeckApk ALL DEPENDS ${APK_TARGETS})

################################
# Export apk
################################
export_java_project(
    NAME ygodeck-android
    APKS ${APK_TARGETS}
)
<commit_msg>Fix example dependency on binding<commit_after>cmake_minimum_required(VERSION 2.8)
project(ygodeck-android)

find_package(ygodeck-java)

if(CMAKE_BUILD_TYPE MATCHES "[dD]ebug")
    set(APK_TARGET_NAME "android-debug.apk")
    set(GRADLE_TASK "assembleDebug")
else()
    set(APK_TARGET_NAME "android-release.apk")
    set(GRADLE_TASK "assembleRelease")
endif()

################################
# Build apk
################################
file(GLOB_RECURSE ANDROID_SRC ./*.java ./*.xml)

set(APK_PATH "${CMAKE_CURRENT_BINARY_DIR}/build/outputs/apk")
set(APK_TARGETS "${APK_PATH}/${APK_TARGET_NAME}")

add_custom_command(
    COMMAND gradlew -p ${CMAKE_CURRENT_LIST_DIR} --project-cache-dir
    ${CMAKE_CURRENT_BINARY_DIR}/gradle
    -PlibraryPath=${YGODECK-JAVA_JAR_PATHS}
    -PbuildDir=${CMAKE_CURRENT_BINARY_DIR}/build ${GRADLE_TASK}
    OUTPUT ${APK_TARGETS}
    DEPENDS ${ANDROID_SRC} ${CMAKE_CURRENT_LIST_FILE} ygodeckJar)

add_custom_target(ygodeckApk ALL DEPENDS ${APK_TARGETS})

################################
# Export apk
################################
export_java_project(
    NAME ygodeck-android
    APKS ${APK_TARGETS}
)

{'fraction_non_alphanumeric': 0.2247992863514719, 'fraction_numerical': 0.001784121320249777, 'mean_word_length': 6.681506849315069, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '293416', 'n_tokens_mistral': 856, 'n_tokens_neox': 810, 'n_words': 111}