Building from source

Toolchain, debug and release builds, signing, and how the Solr configuration gets into the APK.

Everything needed is free: a JDK, the Android SDK, and the Gradle wrapper that ships in the repository.

01 · Toolchain
ToolVersion
JDK17 or newer
Android SDK platform36
Android Gradle Plugin8.13.1
Gradle8.13, downloaded by ./gradlew
Kotlin2.0.21
Minimum Android8.0, API 26

Tell Gradle where the SDK is with the ANDROID_HOME environment variable, or a local.properties file in the project root containing sdk.dir=/path/to/Android/sdk. Android Studio creates that file for you.

02 · A debug build
git clone https://github.com/phpcip/opensolr-photos.git cd opensolr-photos ./gradlew assembleDebug

The APK is in app/build/outputs/apk/debug/. Install it with adb install or copy it to the phone.

Signing in with a debug build

A debug build is signed with your own debug key, which opensolr.com does not list in its assetlinks.json. After you approve the sign-in the browser shows Return to Opensolr Photos; tap its button and the sign-in finishes through opensolr-photos://auth.

03 · A release build

Create signing.properties in the project root. It is git-ignored and must never be committed:

storeFile=/absolute/path/to/release.jks storePassword=... keyAlias=... keyPassword=...
./gradlew assembleRelease

The APK is app/build/outputs/apk/release/app-release.apk, shrunk and signed. Without signing.properties the release APK is built unsigned.

04 · How the Solr configuration gets into the APK

The Gradle task solrConfigZip zips solr/conf into opensolr-photos-conf.zip on every build and adds it to the app's assets. IndexManager reads that asset when it uploads the configuration to an index. Change the schema in solr/conf; never edit a zip by hand.

Opensolr Photos is open source and MIT licensed. Questions about your Opensolr account, index or plan go to opensolr.com/contact; questions about the app itself belong on GitHub.

Opensolr Photos Documentation