Skip to content

Commit

Permalink
Restructure ark-android repository: #55
Browse files Browse the repository at this point in the history
  • Loading branch information
tuancoltech committed Mar 4, 2024
1 parent 2be7202 commit d22b1df
Show file tree
Hide file tree
Showing 148 changed files with 1,043 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: Build the components
on:
push:
branches: [ main ]
paths:
- filepicker/**
pull_request:
branches: [ main ]
paths:
- filepicker/**


jobs:
Expand All @@ -31,8 +35,8 @@ jobs:
echo "${{ secrets.KEYSTORE_ENCRYPTED }}" > keystore.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSWORD }}" --batch keystore.asc > keystore.jks
- name: Build components
run: ./gradlew assembleRelease
- name: Build filepicker module
run: ./gradlew filepicker:assembleRelease

- name: Build release sample APK
run: ./gradlew sample:assembleRelease
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/build_folderstree.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build the components

on:
push:
branches: [ main ]
paths:
- folderstree/**
pull_request:
branches: [ main ]
paths:
- folderstree/**


jobs:
build:
if: ${{ ! startsWith(github.actor, 'dependabot') }}
environment: Development
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: gradle

- name: Validate Gradle wrapper
uses: gradle/[email protected]

- name: Build folderstree module
run: ./gradlew folderstree:assembleRelease
33 changes: 33 additions & 0 deletions .github/workflows/build_scorewidget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build the components

on:
push:
branches: [ main ]
paths:
- scorewidget/**
pull_request:
branches: [ main ]
paths:
- scorewidget/**


jobs:
build:
if: ${{ ! startsWith(github.actor, 'dependabot') }}
environment: Development
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: gradle

- name: Validate Gradle wrapper
uses: gradle/[email protected]

- name: Build scorewidget module
run: ./gradlew scorewidget:assembleRelease
33 changes: 33 additions & 0 deletions .github/workflows/build_tagselector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build the components

on:
push:
branches: [ main ]
paths:
- tagselector/**
pull_request:
branches: [ main ]
paths:
- tagselector/**


jobs:
build:
if: ${{ ! startsWith(github.actor, 'dependabot') }}
environment: Development
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: gradle

- name: Validate Gradle wrapper
uses: gradle/[email protected]

- name: Build tagselector module
run: ./gradlew tagselector:assembleRelease
33 changes: 33 additions & 0 deletions .github/workflows/build_utils.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build the components

on:
push:
branches: [ main ]
paths:
- utils/**
pull_request:
branches: [ main ]
paths:
- utils/**


jobs:
build:
if: ${{ ! startsWith(github.actor, 'dependabot') }}
environment: Development
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: gradle

- name: Validate Gradle wrapper
uses: gradle/[email protected]

- name: Build utils module
run: ./gradlew utils:assembleRelease
28 changes: 28 additions & 0 deletions .github/workflows/release_filepicker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release the components

on:
push:
tags:
- 'filepicker*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Validate Gradle wrapper
uses: gradle/[email protected]

- name: Publish components to Github
uses: gradle/gradle-build-action@v2
with:
arguments: filepicker:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/release_folderstree.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release the components

on:
push:
tags:
- 'folderstree*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Validate Gradle wrapper
uses: gradle/[email protected]

- name: Publish components to Github
uses: gradle/gradle-build-action@v2
with:
arguments: folderstree:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/release_scorewidget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release the components

on:
push:
tags:
- 'scorewidget*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Validate Gradle wrapper
uses: gradle/[email protected]

- name: Publish components to Github
uses: gradle/gradle-build-action@v2
with:
arguments: scorewidget:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/release_tagselector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release the components

on:
push:
tags:
- 'tagselector*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Validate Gradle wrapper
uses: gradle/[email protected]

- name: Publish components to Github
uses: gradle/gradle-build-action@v2
with:
arguments: tagselector:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release the components
on:
push:
tags:
- '*'
- 'utils*'

jobs:
release:
Expand All @@ -23,6 +23,6 @@ jobs:
- name: Publish components to Github
uses: gradle/gradle-build-action@v2
with:
arguments: components:publish
arguments: utils:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
File renamed without changes.
53 changes: 27 additions & 26 deletions components/build.gradle.kts → filepicker/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

android {
namespace = "dev.arkbuilders.components"
namespace = "dev.arkbuilders.components.filepicker"
compileSdk = 34

defaultConfig {
Expand All @@ -34,6 +34,7 @@ android {
kotlinOptions {
jvmTarget = "17"
}

buildFeatures {
viewBinding = true
}
Expand All @@ -45,40 +46,40 @@ android {
}

dependencies {
implementation("androidx.core:core-ktx:1.12.0")
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.9.22"))
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.11.0")
implementation("org.orbit-mvi:orbit-viewmodel:6.1.0")
implementation("dev.arkbuilders:arklib:0.3.5")
implementation("com.mikepenz:fastadapter:5.7.0")
implementation("com.mikepenz:fastadapter-extensions-binding:5.7.0")
implementation("com.mikepenz:fastadapter-extensions-diff:5.7.0")
implementation(libraries.ark.component.utils)
implementation(libraries.ark.component.folderstree)
implementation(libraries.ark.component.tagselector)
implementation(libraries.ark.component.scorewidget)

implementation("com.github.kirich1409:viewbindingpropertydelegate-noreflection:1.5.9")
implementation(libraries.androidx.core.ktx)
implementation(libraries.androidx.appcompat)
implementation(libraries.android.material)
testImplementation(libraries.junit)
androidTestImplementation(libraries.androidx.test.junit)
androidTestImplementation(libraries.androidx.test.espresso)

implementation("androidx.fragment:fragment-ktx:1.6.1")
implementation("com.github.skydoves:balloon:1.6.4")
implementation("com.google.android.flexbox:flexbox:3.0.0")
implementation(libraries.coil)
implementation(libraries.coil.gif)
implementation(libraries.coil.svg)
implementation(libraries.coil.video)

val coilVersion = "2.4.0"
implementation("io.coil-kt:coil:$coilVersion")
implementation("io.coil-kt:coil-gif:$coilVersion")
implementation("io.coil-kt:coil-svg:$coilVersion")
implementation("io.coil-kt:coil-video:$coilVersion")
implementation(libraries.androidx.fragment.ktx)

testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
implementation(libraries.fastadapter)
implementation(libraries.fastadapter.extensions.binding)
implementation(libraries.fastadapter.extensions.diff)
implementation(libraries.arklib)
implementation(libraries.orbit.mvi.viewmodel)
implementation(libraries.viewbinding.property.delegate)
}

val libVersion: String = scmVersion.version

publishing {
publications {
create<MavenPublication>("release") {
groupId = "dev.arkbuilders"
artifactId = "components"
groupId = "dev.arkbuilders.components"
artifactId = "filepicker"
version = libVersion
afterEvaluate {
from(components["release"])
Expand All @@ -88,11 +89,11 @@ publishing {
repositories {
maven {
name = "GithubPackages"
url = URI("https://maven.pkg.github.com/ARK-Builders/ark-components-android")
url = URI("https://maven.pkg.github.com/ARK-Builders/ark-android")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
}
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d22b1df

Please sign in to comment.