From 78ddc891440939df5cc755a670eed086ce2c3745 Mon Sep 17 00:00:00 2001 From: RyuNen344 Date: Sat, 1 Jun 2024 08:10:20 +0900 Subject: [PATCH] chore: setup submodule (#3) * 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 --- .github/dependabot.yml | 9 +++++++++ .github/workflows/check.yml | 6 ++++++ .github/workflows/release-please.yml | 2 ++ .github/workflows/stability.yml | 6 ++++++ .gitignore | 1 + .gitmodules | 3 +++ Glyph-Developer-Kit | 1 + README.md | 7 ++++++- build.gradle | 1 + glyph-compose/build.gradle | 5 +++++ glyph-ktx/build.gradle | 4 ++++ gradle/android.gradle | 9 ++++----- sample-compose/build.gradle | 3 +-- sample-ktx/build.gradle | 3 +-- settings.gradle | 16 ++++++++++++++-- 15 files changed, 64 insertions(+), 12 deletions(-) create mode 100644 .gitmodules create mode 160000 Glyph-Developer-Kit diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f8324bc..b2e64b5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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: diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 489e95b..3623b60 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 5db2926..7a7058a 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -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 diff --git a/.github/workflows/stability.yml b/.github/workflows/stability.yml index 9e1dffe..ac36c6a 100644 --- a/.github/workflows/stability.yml +++ b/.github/workflows/stability.yml @@ -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 @@ -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 @@ -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 diff --git a/.gitignore b/.gitignore index fb7a91a..e156b07 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ *.iml .idea/androidTestResultsUserPreferences.xml .idea/compiler.xml +.idea/deploymentTargetSelector.xml .idea/.name .idea/git_toolbox_prj.xml .idea/gradle.xml diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2ae8254 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Glyph-Developer-Kit"] + path = Glyph-Developer-Kit + url = git@github.com:Nothing-Developer-Programme/Glyph-Developer-Kit.git diff --git a/Glyph-Developer-Kit b/Glyph-Developer-Kit new file mode 160000 index 0000000..7e6c20f --- /dev/null +++ b/Glyph-Developer-Kit @@ -0,0 +1 @@ +Subproject commit 7e6c20f1e5c4575b7c3a636d3881dcc236a96780 diff --git a/README.md b/README.md index 402e9f0..e600403 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,12 @@ dependencyResolutionManagement { repositories { google() mavenCentral() - maven { url 'https://jitpack.io' } + maven { + url 'https://jitpack.io' + content { + includeGroupByRegex("com.github.RyuNen344.GlyphKtx*") + } + } } } ``` diff --git a/build.gradle b/build.gradle index b146dd1..26bda55 100644 --- a/build.gradle +++ b/build.gradle @@ -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 diff --git a/glyph-compose/build.gradle b/glyph-compose/build.gradle index eb56273..8da4feb 100644 --- a/glyph-compose/build.gradle +++ b/glyph-compose/build.gradle @@ -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 +} diff --git a/glyph-ktx/build.gradle b/glyph-ktx/build.gradle index 6c92421..87b20b3 100644 --- a/glyph-ktx/build.gradle +++ b/glyph-ktx/build.gradle @@ -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") +} diff --git a/gradle/android.gradle b/gradle/android.gradle index a2d0b4a..b581a63 100644 --- a/gradle/android.gradle +++ b/gradle/android.gradle @@ -1,9 +1,8 @@ android { compileSdk = 34 defaultConfig { - minSdk = 19 + minSdk = 34 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - multiDexEnabled = true consumerProguardFile "consumer-rules.pro" } buildTypes { @@ -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() diff --git a/sample-compose/build.gradle b/sample-compose/build.gradle index 361ebb0..6e8a246 100644 --- a/sample-compose/build.gradle +++ b/sample-compose/build.gradle @@ -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") diff --git a/sample-ktx/build.gradle b/sample-ktx/build.gradle index 2097936..2a69dd0 100644 --- a/sample-ktx/build.gradle +++ b/sample-ktx/build.gradle @@ -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") diff --git a/settings.gradle b/settings.gradle index 260b050..236a82f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,6 +1,12 @@ pluginManagement { repositories { - google() + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } mavenCentral() gradlePluginPortal() } @@ -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() } }