Skip to content

Commit

Permalink
Restructure modules with shorter naming
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewCarlson committed Nov 20, 2023
1 parent d9285c5 commit 3d3a20b
Show file tree
Hide file tree
Showing 364 changed files with 126 additions and 130 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,49 +31,49 @@ jobs:
uses: tj-actions/changed-files@v40
with:
files: |
**/anystream-client-android/**/*.kt
**/anystream-client-android/**/*.kts
**/client/android/**/*.kt
**/client/android/**/*.kts
- name: Get changed files
id: client-core
uses: tj-actions/changed-files@v40
with:
files: |
**/anystream-client-core/**/*.kt
**/anystream-client-core/**/*.kts
**/client/core/**/*.kt
**/client/core/**/*.kts
- name: Get changed files
id: data-models
uses: tj-actions/changed-files@v40
with:
files: |
**/anystream-data-models/**/*.kt
**/anystream-data-models/**/*.kts
**/client/data-models/**/*.kt
**/client/data-models/**/*.kts
- name: Get changed files
id: client-ui
uses: tj-actions/changed-files@v40
with:
files: |
**/anystream-client-ui/**/*.kt
**/anystream-client-ui/**/*.kts
**/client/ui/**/*.kt
**/client/ui/**/*.kts
- name: Get changed files
id: server
uses: tj-actions/changed-files@v40
with:
files: |
**/anystream-server/**/*.kt
**/anystream-server/**/*.kts
**/server/**/*.kt
**/server/**/*.kts
- name: Get changed files
id: ios
uses: tj-actions/changed-files@v40
with:
files: |
**/anystream-client-ios/**
**/client/ios/**
- name: Get changed files
id: web
uses: tj-actions/changed-files@v40
with:
files: |
**/anystream-client-web/**/*.kt
**/anystream-client-web/**/*.kts
**/client/web/**/*.kt
**/client/web/**/*.kts
client-ui:
runs-on: ubuntu-latest
Expand All @@ -100,7 +100,7 @@ jobs:
- uses: gradle/gradle-build-action@v2
name: Spotless Check
with:
arguments: -p anystream-client-ui spotlessCheck
arguments: -p client:ui spotlessCheck

client-android:
runs-on: ubuntu-latest
Expand All @@ -127,7 +127,7 @@ jobs:
- uses: gradle/gradle-build-action@v2
name: Spotless Check
with:
arguments: -p anystream-client-android spotlessCheck
arguments: -p client:android spotlessCheck

client-core:
runs-on: ubuntu-latest
Expand All @@ -154,7 +154,7 @@ jobs:
- uses: gradle/gradle-build-action@v2
name: Spotless Check
with:
arguments: -p anystream-client-core spotlessCheck
arguments: -p client:core spotlessCheck

client-web:
runs-on: ubuntu-latest
Expand All @@ -181,7 +181,7 @@ jobs:
- uses: gradle/gradle-build-action@v2
name: Spotless Check
with:
arguments: -p anystream-client-web spotlessCheck
arguments: -p client:web spotlessCheck

data-models:
runs-on: ubuntu-latest
Expand All @@ -208,7 +208,7 @@ jobs:
- uses: gradle/gradle-build-action@v2
name: Spotless Check
with:
arguments: -p anystream-data-models spotlessCheck
arguments: -p client:data-models spotlessCheck

server:
runs-on: ubuntu-latest
Expand All @@ -235,4 +235,4 @@ jobs:
- uses: gradle/gradle-build-action@v2
name: Spotless Check
with:
arguments: -p anystream-server spotlessCheck
arguments: -p server spotlessCheck
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:
build.gradle.kts
gradle/*.versions.toml
gradle/kotlin-js-store/**
**/anystream-client-web/**
**/anystream-client-ui/**
**/anystream-client-core/**
**/anystream-data-models/**
**/anystream-server/**
**/client/web/**
**/client/ui/**
**/client/core/**
**/client/data-models/**
**/server/**
Dockerfile
Dockerfile-local
- name: Get changed files
Expand Down
60 changes: 30 additions & 30 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ jobs:
gradle/libsCommon.versions.toml
gradle/libsClient.versions.toml
gradle/libsAndroid.versions.toml
**/anystream-client-android/**
**/anystream-client-core/src/commonMain/**
**/anystream-client-core/src/commonTest/**
**/anystream-client-core/src/androidMain/**
**/anystream-data-models/**
**/client/android/**
**/client/core/src/commonMain/**
**/client/core/src/commonTest/**
**/client/core/src/androidMain/**
**/client/data-models/**
- name: Get changed files
id: client-core
uses: tj-actions/changed-files@v40
with:
files: |
gradle/libsCommon.versions.toml
gradle/libsClient.versions.toml
**/anystream-client-core/**
**/anystream-data-models/**
**/client/core/**
**/client/data-models/**
- name: Get changed files
id: client-ui
uses: tj-actions/changed-files@v40
Expand All @@ -60,35 +60,35 @@ jobs:
gradle/libsCommon.versions.toml
gradle/libsClient.versions.toml
gradle/libsAndroid.versions.toml
**/anystream-client-ui/**
**/client/ui/**
- name: Get changed files
id: data-models
uses: tj-actions/changed-files@v40
with:
files: |
gradle/libsCommon.versions.toml
**/anystream-data-models/**
**/client/data-models/**
- name: Get changed files
id: server
uses: tj-actions/changed-files@v40
with:
files: |
gradle/libsCommon.versions.toml
gradle/libsServer.versions.toml
**/anystream-data-models/**
**/anystream-server/**
**/client/data-models/**
**/server/**
- name: Get changed files
id: ios
uses: tj-actions/changed-files@v40
with:
files: |
gradle/libsCommon.versions.toml
gradle/libsClient.versions.toml
**/anystream-client-ios/**
**/anystream-client-core/src/commonMain/**
**/anystream-client-core/src/commonTest/**
**/anystream-client-core/src/iosMain/**
**/anystream-data-models/**
**/client/ios/**
**/client/core/src/commonMain/**
**/client/core/src/commonTest/**
**/client/core/src/iosMain/**
**/client/data-models/**
- name: Get changed files
id: web
uses: tj-actions/changed-files@v40
Expand All @@ -97,11 +97,11 @@ jobs:
gradle/libsCommon.versions.toml
gradle/libsClient.versions.toml
gradle/kotlin-js-store/**
**/anystream-client-web/**
**/anystream-client-core/src/commonMain/**
**/anystream-client-core/src/commonTest/**
**/anystream-client-core/src/androidMain/**
**/anystream-data-models/**
**/client/web/**
**/client/core/src/commonMain/**
**/client/core/src/commonTest/**
**/client/core/src/androidMain/**
**/client/data-models/**
client-core-tests:
needs: [ file-changes ]
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
- uses: gradle/gradle-build-action@v2
name: All Tests
with:
arguments: anystream-client-core:allTests anystream-client-core:koverXmlReport
arguments: client:core:allTests client:core:koverXmlReport

- name: Archive Reports
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
- uses: gradle/gradle-build-action@v2
name: All Tests
with:
arguments: anystream-client-ui:allTests anystream-client-ui:koverXmlReport
arguments: client:ui:allTests client:ui:koverXmlReport

- name: Archive Reports
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
- uses: gradle/gradle-build-action@v2
name: Web Tests
with:
arguments: anystream-client-web:jsBrowserTest anystream-client-web:koverXmlReport
arguments: client:web:jsBrowserTest client:web:koverXmlReport

- name: Archive Reports
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -303,12 +303,12 @@ jobs:
name: Run Server Tests
with:
arguments: >
anystream-server:server-app:test anystream-server:server-app:koverXmlReport
anystream-server:server-db-models:test anystream-server:server-db-models:koverXmlReport
anystream-server:server-library-manager:test anystream-server:server-library-manager:koverXmlReport
anystream-server:server-metadata-manager:test anystream-server:server-metadata-manager:koverXmlReport
anystream-server:server-shared:test anystream-server:server-shared:koverXmlReport
anystream-server:server-stream-service:test anystream-server:server-stream-service:koverXmlReport
server:application:test server:application:koverXmlReport
server:db-models:test server:db-models:koverXmlReport
server:library-manager:test server:library-manager:koverXmlReport
server:metadata-manager:test server:metadata-manager:koverXmlReport
server:shared:test server:shared:koverXmlReport
server:stream-service:test server:stream-service:koverXmlReport
- name: Archive Reports
uses: actions/upload-artifact@v3
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ FROM mcr.microsoft.com/java/jdk:17-zulu-alpine

COPY . /build-project
WORKDIR /build-project
RUN ./gradlew :anystream-server:server-app:installShadowDist :anystream-client-web:jsBrowserProductionWebpack --console=plain --no-daemon
RUN ./gradlew :server:application:installShadowDist :client:web:jsBrowserProductionWebpack --console=plain --no-daemon

FROM mcr.microsoft.com/java/jre:11-zulu-alpine

RUN apk add --update --no-cache bash ffmpeg

WORKDIR /app

COPY --from=0 /build-project/anystream-server/server-app/build/install ./install/
COPY --from=0 /build-project/anystream-client-web/build/dist/js/productionExecutable ./client-web/
COPY --from=0 /build-project/server/application/build/install ./install/
COPY --from=0 /build-project/client/web/build/dist/js/productionExecutable ./client-web/

ENV DATA_PATH=/app/storage/
ENV DATABASE_URL=sqlite:/app/storage/config/anystream.db
ENV FFMPEG_PATH=/usr/bin
ENV WEB_CLIENT_PATH=/app/client-web
ENV PORT=8888

ENTRYPOINT ["./install/anystream-server/bin/anystream"]
ENTRYPOINT ["./install/application/bin/anystream"]
4 changes: 2 additions & 2 deletions Dockerfile-local
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ RUN apk add --update --no-cache bash ffmpeg

WORKDIR /app

COPY anystream-server/server-app/build/install ./install/
COPY anystream-client-web/build/dist/js/productionExecutable ./client-web/
COPY server/application/build/install ./install/
COPY client/web/build/dist/js/productionExecutable ./client-web/

ENV DATA_PATH=/app/storage/
ENV DATABASE_URL=sqlite:/app/storage/config/anystream.db
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@

### Project Structure

- [anystream-server](anystream-server) — Web server for managing and streaming media built with [Ktor](https://github.com/ktorio/ktor)
- [anystream-data-models](anystream-data-models) — Data models shared between the server and clients
- [anystream-client-core](anystream-client-core) — Multiplatform infrastructure for AnyStream client applications built with [Mobius.kt](https://github.com/DrewCarlson/mobius.kt)
- [anystream-client-web](anystream-client-web) — Web client implementation built with [Compose HTML](https://github.com/JetBrains/compose-multiplatform#libraries)
- [anystream-client-ui](anystream-client-ui) — Shared [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform/) UI for Mobile & Desktop
- [anystream-client-android](anystream-client-android) — Android client implementation built with [Jetpack Compose](https://developer.android.com/jetpack/compose)
- [anystream-client-ios](anystream-client-ios) — iOS client implementation built with [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform/) & [SwiftUI](https://developer.apple.com/xcode/swiftui/)
- [anystream-client-desktop](anystream-client-desktop) — Experimental Desktop client implementation with [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform/)
- [server](server) — Web server for managing and streaming media built with [Ktor](https://github.com/ktorio/ktor)
- [client/data-models](client/data-models) — Data models shared between the server and clients
- [client/core](client/core) — Multiplatform infrastructure for AnyStream client applications built with [Mobius.kt](https://github.com/DrewCarlson/mobius.kt)
- [client/web](client/web) — Web client implementation built with [Compose HTML](https://github.com/JetBrains/compose-multiplatform#libraries)
- [client/ui](client/ui) — Shared [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform/) UI for Mobile & Desktop
- [client/android](client/android) — Android client implementation built with [Jetpack Compose](https://developer.android.com/jetpack/compose)
- [client/ios](client/ios) — iOS client implementation built with [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform/) & [SwiftUI](https://developer.apple.com/xcode/swiftui/)
- [client/desktop](client/desktop) — Experimental Desktop client implementation with [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform/)

### Development Setup

Expand Down
8 changes: 4 additions & 4 deletions build-logic/src/main/kotlin/multiplatform-lib.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (hasAndroidSdk) {
minSdk = 23
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
namespace = "anystream.${project.name.substringAfter("anystream-").replace("-", "")}"
namespace = "anystream.${project.name.replace("-", "")}"
compileOptions {
sourceCompatibility = JAVA_TARGET
targetCompatibility = JAVA_TARGET
Expand All @@ -39,7 +39,7 @@ afterEvaluate {
}
}

val enableJsTarget = project.name != "anystream-client-ui"
val enableJsTarget = project.name != "ui"

kotlin {
jvmToolchain(JAVA_TARGET.majorVersion.toInt())
Expand All @@ -66,7 +66,7 @@ kotlin {
}
// Note: Workaround build script errors when configuring frameworks
// "Could not create task of type 'KotlinNativeLink'."
if (project.name != "anystream-client-ui") {
if (project.name != "ui") {
iosArm64()
iosSimulatorArm64()
iosX64()
Expand Down Expand Up @@ -140,7 +140,7 @@ kotlin {

// Note: Workaround build script errors when configuring frameworks
// "Could not create task of type 'KotlinNativeLink'."
if (project.name != "anystream-client-ui") {
if (project.name != "ui") {
configureCommonIosSourceSets()

configure(
Expand Down
2 changes: 1 addition & 1 deletion build-logic/src/main/kotlin/server-lib.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ afterEvaluate {
kotlin {
target("**/**.kt")
licenseHeaderFile(rootDir.resolve("licenseHeader.txt"))
val libsCommon = extensions.getByType<VersionCatalogsExtension>().named("libsCommon")
//val libsCommon = extensions.getByType<VersionCatalogsExtension>().named("libsCommon")
//ktlint(libsCommon.findVersion("ktlint").get().requiredVersion)
// .setEditorConfigPath(rootDir.resolve(".editorconfig"))
}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ android {
}

dependencies {
implementation(projects.anystreamClientCore)
implementation(projects.anystreamClientUi)
implementation(projects.client.core)
implementation(projects.client.ui)
implementation(libsAndroid.androidx.core.ktx)
implementation(libsAndroid.androidx.appcompat.core)
implementation(libsAndroid.androidx.leanback.core)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ kotlin {

val commonMain by getting {
dependencies {
api(projects.anystreamDataModels)
api(projects.client.dataModels)
implementation(libsCommon.atomicfu)
implementation(libsCommon.coroutines.core)
implementation(libsCommon.serialization.core)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 3d3a20b

Please sign in to comment.