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
71 changes: 71 additions & 0 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build Variant artifacts

on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

jobs:
code-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Setup Java
uses: actions/setup-java@v5
with:
java-version: 17
distribution: zulu
cache: 'gradle'

- name: Check Spotless
run: ./gradlew spotlessCheck

build_android:
name: Build Android app
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Set up Java
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Build app
run: ./gradlew assembleDebug lintDebug

build_ios:
name: Build iOS app
runs-on: macos-latest

steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Checkout
uses: actions/checkout@v5

- name: Build iOS app
uses: mxcl/xcodebuild@v3
with:
xcode: ^16
scheme: Variant
platform: iOS
action: build
working-directory: iosVariant
17 changes: 17 additions & 0 deletions .spotless/copyright.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Variant - A digital comic book reading application for the iPad and Android tablets.
* Copyright (C) $YEAR, The ComiXed Project
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses>
*/
77 changes: 35 additions & 42 deletions androidVariant/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,51 +1,44 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
}

android {
namespace = "org.comixedproject.variant.android"
compileSdk = 34
defaultConfig {
applicationId = "org.comixedproject.variant.android"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "0.2.dev"
multiDexEnabled = true
}
buildFeatures {
compose = true
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
}
}
compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
namespace = "org.comixedproject.variant.android"
compileSdk = 36
defaultConfig {
applicationId = "org.comixedproject.variant.android"
minSdk = 26
targetSdk = 36
versionCode = 1
versionName = "0.2.dev"
multiDexEnabled = true
}
buildFeatures { compose = true }
packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" } }
buildTypes {
getByName("release") {
isMinifyEnabled = true
isShrinkResources = true
}
}
compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlin { jvmToolchain(17) }
}

dependencies {
implementation(projects.shared)
implementation(libs.koin.android)
implementation(libs.bundles.android.compose)
implementation(libs.compose.ui)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.androidx.activity.compose)
debugImplementation(libs.compose.ui.tooling)
implementation(projects.shared)
implementation(libs.koin.android)
implementation(libs.bundles.android.compose)
implementation(libs.compose.ui)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.androidx.activity.compose)
debugImplementation(libs.compose.ui.tooling)

coreLibraryDesugaring(libs.desugar.jdk.libs)
}
coreLibraryDesugaring(libs.desugar.jdk.libs)
}
2 changes: 1 addition & 1 deletion androidVariant/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
</intent-filter>
</activity>
</application>
</manifest>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -24,104 +24,78 @@ import org.comixedproject.variant.model.library.ComicBookMetadata
import org.comixedproject.variant.model.library.ComicPage
import org.comixedproject.variant.model.library.DirectoryEntry

val DIRECTORY_LIST = listOf(
val DIRECTORY_LIST =
listOf(
DirectoryEntry(1, "1", "All Comics", "/api/v1/all", 0, "/api/v1/root", "", true, null),
DirectoryEntry(
1,
"1",
"All Comics",
"/api/v1/all",
0,
"/api/v1/root",
"",
true,
null
2,
"2",
"Unread Comics",
"/api/v1/all?unread=true",
0,
"/api/v1/root",
"",
true,
null,
),
DirectoryEntry(3, "3", "Collections", "/api/v1/collections", 0, "/api/v1/root", "", true, null),
DirectoryEntry(
2,
"2",
"Unread Comics",
"/api/v1/all?unread=true",
0,
"/api/v1/root",
"",
true,
null
4,
"4",
"Reading Lists",
"/api/v1/lists/reading",
0,
"/api/v1/root",
"",
true,
null,
),
DirectoryEntry(5, "5", "Smart Lists", "/api/v1/lists/smart", 0, "/api/v1/root", "", true, null),
DirectoryEntry(
3,
"3",
"Collections",
"/api/v1/collections",
0,
"/api/v1/root",
"",
true,
null
11,
"11",
"The Amazing Spider-Man V2018 #75 (unknown)",
"Amazing Spider-Man #75 (v2018) (No Cover Date).cbz",
(32 * BYTES_PER_MB).toLong(),
"/api/v1/lists/reading",
"/api/v1/root",
false,
"",
),
DirectoryEntry(
4,
"4",
"Reading Lists",
"/api/v1/lists/reading",
0,
"/api/v1/root",
"",
true,
null
12,
"12",
"The Amazing Spider-Man V2022 #75 (unknown)",
"Amazing Spider-Man #6 (v2022) (Sep 2022).cbz",
(32 * BYTES_PER_MB).toLong(),
"/api/v1/lists/smart",
"/api/v1/root",
false,
"",
),
DirectoryEntry(
5,
"5",
"Smart Lists",
"/api/v1/lists/smart",
0,
"/api/v1/root",
"",
true,
null
13,
"13",
"[unknown] V???? #? (unknown)",
"Unknown VUnknown #Unknown (Unknown).cbz",
(32 * BYTES_PER_MB).toLong(),
"/api/v1/lists/smart",
"/api/v1/root",
false,
"",
),
DirectoryEntry(
11,
"11",
"The Amazing Spider-Man V2018 #75 (unknown)",
"Amazing Spider-Man #75 (v2018) (No Cover Date).cbz",
(32 * BYTES_PER_MB).toLong(),
"/api/v1/lists/reading",
"/api/v1/root",
false,
""
),
DirectoryEntry(
12,
"12",
"The Amazing Spider-Man V2022 #75 (unknown)",
"Amazing Spider-Man #6 (v2022) (Sep 2022).cbz",
(32 * BYTES_PER_MB).toLong(),
"/api/v1/lists/smart",
"/api/v1/root",
false,
""
),
DirectoryEntry(
13,
"13",
"[unknown] V???? #? (unknown)",
"Unknown VUnknown #Unknown (Unknown).cbz",
(32 * BYTES_PER_MB).toLong(),
"/api/v1/lists/smart",
"/api/v1/root",
false,
""
)
)
)

val COMIC_BOOK_LIST = DIRECTORY_LIST.filter { !it.isDirectory }.map {
ComicBook(
val COMIC_BOOK_LIST =
DIRECTORY_LIST.filter { !it.isDirectory }
.map {
ComicBook(
it.path,
it.filename,
(it.filename.length * 1024).toLong(),
System.currentTimeMillis(),
ComicBookMetadata("Marvel", "The Amazing Spider-Man", "1963", "181"),
mutableListOf(ComicPage("page-0.jpg"))
)
}.toList()
mutableListOf(ComicPage("page-0.jpg")),
)
}
.toList()
Loading