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
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM gradle:8.13.0-jdk17
FROM gradle:8.14.2-jdk17

# Install system dependencies
RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends \
Expand All @@ -18,7 +18,7 @@ ENV ANDROID_SDK_HOME=${ANDROID_HOME}
ENV PATH ${ANDROID_HOME}/cmdline-tools/cmdline-tools/bin:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:${PATH}

# set default build arguments
ARG SDK_VERSION=commandlinetools-linux-12266719_latest.zip
ARG SDK_VERSION=commandlinetools-linux-12700392_latest.zip

# Full reference at https://dl.google.com/android/repository/repository2-1.xml
# Download and unpack android SDKs
Expand All @@ -29,15 +29,18 @@ RUN curl -sSL https://dl.google.com/android/repository/${SDK_VERSION} -o /tmp/sd
&& yes | sdkmanager --licenses

# Set these to the same versions as in build.gradle to avoid downloading updated tools
ARG ANDROID_BUILD_VERSION=35
ARG ANDROID_TOOLS_VERSION=35.0.0
ARG ANDROID_BUILD_VERSION=36
ARG ANDROID_TOOLS_VERSION=36.0.0

RUN yes | sdkmanager "platform-tools" \
COPY projectBlueWater/src/test/resources/robolectric.properties ./

RUN . ./robolectric.properties && (yes | sdkmanager "platform-tools" \
# "emulator" \ # keeping just in case it is needed
"platforms;android-${ANDROID_BUILD_VERSION}" \
"build-tools;${ANDROID_TOOLS_VERSION}" \
"build-tools;${sdk}.0.0" \
# "add-ons;addon-google_apis-google-23" \ # keeping in case addons are needed
"extras;android;m2repository"
"extras;android;m2repository")

WORKDIR /src

Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '2.0.20'
ext.kotlin_version = '2.2.0'

repositories {
mavenCentral()
Expand All @@ -10,8 +10,8 @@ buildscript {
}

plugins {
id 'com.android.application' version '8.11.0' apply false
id 'com.android.library' version '8.11.0' apply false
id 'com.android.application' version '8.11.1' apply false
id 'com.android.library' version '8.11.1' apply false
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
id 'org.jetbrains.kotlin.plugin.compose' version "$kotlin_version" apply false
}
Expand Down
15 changes: 7 additions & 8 deletions projectBlueWater/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id "de.mannodermaus.android-junit5" version "1.13.0.0"
id "de.mannodermaus.android-junit5" version "1.13.1.0"
id 'org.jetbrains.kotlin.plugin.serialization' version '2.2.0'
}

Expand All @@ -26,11 +26,11 @@ if (!hasAndroidStorePassword()) {
def isSignedExternally = { hasKeyStorePassword() && hasAndroidStorePassword() }

android {
compileSdk 35
compileSdk 36

defaultConfig {
minSdkVersion 21
targetSdkVersion 35
targetSdkVersion 36
versionName gitVersion()
archivesBaseName = "project-blue-" + gitVersion()
}
Expand Down Expand Up @@ -170,7 +170,7 @@ dependencies {
def compose_version = '1.8.3'
def media3_version = '1.7.1'
def lifecycle_version = '2.9.1'
def junit5_version = '5.13.2'
def junit5_version = '5.13.3'

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'

Expand All @@ -192,13 +192,13 @@ dependencies {
implementation 'org.slf4j:slf4j-api:2.0.17'
implementation 'com.github.tony19:logback-android:3.0.0'
implementation 'com.namehillsoftware:handoff:0.30.1'
implementation 'io.reactivex.rxjava3:rxjava:3.1.10'
implementation 'io.reactivex.rxjava3:rxjava:3.1.11'
implementation 'com.namehillsoftware:lazy-j:0.11.0'
implementation 'org.jsoup:jsoup:1.21.1'
implementation "androidx.media3:media3-exoplayer:$media3_version"
implementation "androidx.media3:media3-datasource-okhttp:$media3_version"
implementation 'com.squareup.okio:okio:3.13.0'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.16'
implementation 'com.squareup.okio:okio:3.15.0'
implementation 'com.squareup.okhttp3:okhttp:5.1.0'
implementation 'com.namehillsoftware:querydroid:0.6.0'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
Expand All @@ -223,7 +223,6 @@ dependencies {
testImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
androidTestImplementation "org.assertj:assertj-core:3.27.3"
androidTestImplementation 'androidx.test.ext:junit-ktx:1.2.1'
androidTestImplementation 'androidx.test:core:1.6.1'
Expand Down
10 changes: 5 additions & 5 deletions projectBlueWater/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
-keep class android.arch.lifecycle.** {*;}

# okhttp rules
-dontwarn okhttp3.**
-dontwarn okio.**
-dontwarn javax.annotation.**
#-dontwarn okhttp3.**
#-dontwarn okio.**
#-dontwarn javax.annotation.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
#-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase

-keep class * implements android.os.Parcelable {
public static final ** CREATOR;
}

-keepclassmembers class ch.qos.logback.core.rolling.helper.* { <init>(); }
-keepclassmembers class ch.qos.logback.classic.pattern.* { <init>(); }
-keepclassmembers class ch.qos.logback.classic.pattern.* { <init>(); }

# -printseeds /home/david/sandbox/projectBlue/projectBlueWater/release/seeds.txt # print out classes that are kept
# -printusage /home/david/sandbox/projectBlue/projectBlueWater/release/usage.txt # print out classes that are obfuscated
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class DiskFileCachePersistence(

return cachedFilesProvider
.promiseCachedFile(libraryId, uniqueKey)
.eventually<CachedFile?> { cachedFile ->
.eventually { cachedFile ->
cachedFile
?.let {
if (it.fileName == canonicalFilePath) diskFileAccessTimeUpdater.promiseFileAccessedUpdate(it)
Expand Down Expand Up @@ -93,7 +93,7 @@ class DiskFileCachePersistence(
}
}

private fun promiseFilePathUpdate(cachedFile: CachedFile): Promise<CachedFile> = promiseTableMessage<CachedFile> {
private fun promiseFilePathUpdate(cachedFile: CachedFile): Promise<CachedFile> = promiseTableMessage {
val cachedFileId = cachedFile.id
val cachedFilePath = cachedFile.fileName
RepositoryAccessHelper(context).use { repositoryAccessHelper ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class WhenUpdatingFileProperties {
every { promiseIsReadOnly(LibraryId(libraryId)) } returns true.toPromise()
},
mockk {
every { promiseRevision(LibraryId(libraryId)) } returns 836.toPromise()
every { promiseRevision(LibraryId(libraryId)) } returns 836L.toPromise()
},
filePropertiesContainer,
recordingApplicationMessageBus,
Expand Down