Skip to content

Commit

Permalink
chore: setup submodule (#3)
Browse files Browse the repository at this point in the history
* chore(git): setup submodule

* chore: update README

* chore: update gradle setting

* chore: update settings

* chore(actions): update actions to checkout with submodule

* chore: update dependabot
  • Loading branch information
RyuNen344 authored May 31, 2024
1 parent 323ad58 commit 78ddc89
Show file tree
Hide file tree
Showing 15 changed files with 64 additions and 12 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ updates:
- "kotlin"
- "com.google.devtools.ksp"

- package-ecosystem: gitsubmodule
directory: "/"
schedule:
interval: "daily"
time: "09:00"
timezone: "Asia/Tokyo"
commit-message:
prefix: "deps(gitsubmodule)"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/gradle
- name: check publish task
shell: bash
Expand All @@ -37,6 +39,8 @@ jobs:
module: [ "glyph-ktx", "glyph-compose" ]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/gradle
- name: unit test
shell: bash
Expand Down Expand Up @@ -68,6 +72,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/gradle
- name: check api file
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
id: release
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
with:
submodules: true
- uses: ./.github/actions/gradle
if: ${{ steps.release.outputs.release_created }}
- name: generate artifacts
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/stability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/gradle
- name: check publish task
shell: bash
Expand All @@ -33,6 +35,8 @@ jobs:
module: [ "glyph-ktx", "glyph-compose" ]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/gradle
- name: unit test
shell: bash
Expand Down Expand Up @@ -64,6 +68,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/gradle
- name: check api file
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*.iml
.idea/androidTestResultsUserPreferences.xml
.idea/compiler.xml
.idea/deploymentTargetSelector.xml
.idea/.name
.idea/git_toolbox_prj.xml
.idea/gradle.xml
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Glyph-Developer-Kit"]
path = Glyph-Developer-Kit
url = [email protected]:Nothing-Developer-Programme/Glyph-Developer-Kit.git
1 change: 1 addition & 0 deletions Glyph-Developer-Kit
Submodule Glyph-Developer-Kit added at 7e6c20
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
maven {
url 'https://jitpack.io'
content {
includeGroupByRegex("com.github.RyuNen344.GlyphKtx*")
}
}
}
}
```
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
alias libs.plugins.com.android.application apply false
alias libs.plugins.com.android.library apply false
alias libs.plugins.org.jetbrains.kotlin.android apply false
alias libs.plugins.nexus.publish
Expand Down
5 changes: 5 additions & 0 deletions glyph-compose/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ apply from: rootProject.layout.projectDirectory.file("gradle/publish.gradle")
apply from: rootProject.layout.projectDirectory.file("gradle/testing.gradle")

android.namespace = "io.github.ryunen344.glyph.compose"

dependencies {
api files("../Glyph-Developer-Kit/sdk/KetchumSDK_Community_20240307.jar")
implementation projects.glyphKtx
}
4 changes: 4 additions & 0 deletions glyph-ktx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ apply from: rootProject.layout.projectDirectory.file("gradle/publish.gradle")
apply from: rootProject.layout.projectDirectory.file("gradle/testing.gradle")

android.namespace = "io.github.ryunen344.glyph.ktx"

dependencies {
api files("../Glyph-Developer-Kit/sdk/KetchumSDK_Community_20240307.jar")
}
9 changes: 4 additions & 5 deletions gradle/android.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
android {
compileSdk = 34
defaultConfig {
minSdk = 19
minSdk = 34
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled = true
consumerProguardFile "consumer-rules.pro"
}
buildTypes {
Expand All @@ -16,10 +15,10 @@ android {
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.jvmTarget = "11"
publishing {
singleVariant("release") {
withSourcesJar()
Expand Down
3 changes: 1 addition & 2 deletions sample-compose/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
alias libs.plugins.com.android.library
alias libs.plugins.com.android.application
alias libs.plugins.org.jetbrains.kotlin.android
alias libs.plugins.org.jetbrains.kotlinx.compatibility
}

apply from: rootProject.layout.projectDirectory.file("gradle/android.gradle")
Expand Down
3 changes: 1 addition & 2 deletions sample-ktx/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
alias libs.plugins.com.android.library
alias libs.plugins.com.android.application
alias libs.plugins.org.jetbrains.kotlin.android
alias libs.plugins.org.jetbrains.kotlinx.compatibility
}

apply from: rootProject.layout.projectDirectory.file("gradle/android.gradle")
Expand Down
16 changes: 14 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
pluginManagement {
repositories {
google()
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
Expand All @@ -13,7 +19,13 @@ plugins {
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
}
}
Expand Down

0 comments on commit 78ddc89

Please sign in to comment.