Skip to content
Open
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
132 changes: 66 additions & 66 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,81 +16,81 @@ jobs:
environment: Development
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

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

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3

- name: Build debug APK
run: ./gradlew assembleDebug
- name: Build debug APK
run: ./gradlew assembleDebug

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

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

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3

- name: Decrypt the keystore for signing
run: |
echo "${{ secrets.KEYSTORE_ENCRYPTED }}" > keystore.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSWORD }}" --batch keystore.asc > keystore.jks

- name: Build release APK
run: ./gradlew assembleRelease

- name: Upload release Github arm64-v8a APK
uses: actions/upload-artifact@v4
with:
name: release-arm64-v8a-apk-github
path: ./app/build/outputs/apk/github/release/app-github-arm64-v8a-release.apk

- name: Upload release Github armeabi-v7a APK
uses: actions/upload-artifact@v4
with:
name: release-armeabi-v7a-apk-github
path: ./app/build/outputs/apk/github/release/app-github-armeabi-v7a-release.apk

- name: Upload release Github universal APK
uses: actions/upload-artifact@v4
with:
name: release-universal-apk-github
path: ./app/build/outputs/apk/github/release/app-github-universal-release.apk

- name: Upload release GooglePlay arm64-v8a APK
uses: actions/upload-artifact@v4
with:
name: release-arm64-v8a-apk-googleplay
path: ./app/build/outputs/apk/googleplay/release/app-googleplay-arm64-v8a-release.apk

- name: Upload release GooglePlay armeabi-v7a APK
uses: actions/upload-artifact@v4
with:
name: release-armeabi-v7a-apk-googleplay
path: ./app/build/outputs/apk/googleplay/release/app-googleplay-armeabi-v7a-release.apk

- name: Upload release GooglePlay universal APK
uses: actions/upload-artifact@v4
with:
name: release-universal-apk-googleplay
path: ./app/build/outputs/apk/googleplay/release/app-googleplay-universal-release.apk
- uses: actions/checkout@v4

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

Comment on lines +41 to +47
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix: setup-java v4 no longer supports distribution 'adopt'

actions/setup-java@v4 does not accept 'adopt'. Use 'temurin' for Java 17 (AdoptOpenJDK migrated to Eclipse Temurin).

Apply this diff:

-      - name: Set up JDK 17
+      - name: Set up Temurin JDK 17
         uses: actions/setup-java@v4
         with:
           java-version: '17'
-          distribution: 'adopt'
+          distribution: 'temurin'
           cache: gradle
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Set up Temurin JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
🤖 Prompt for AI Agents
.github/workflows/build.yml around lines 17 to 23: the workflow uses
actions/setup-java@v4 with distribution: 'adopt' which is no longer supported;
update the distribution value to 'temurin' (keeping java-version: '17' and
cache: gradle) so the setup-java step uses Eclipse Temurin for Java 17.

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3

- name: Decrypt the keystore for signing
run: |
echo "${{ secrets.KEYSTORE_ENCRYPTED }}" > keystore.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSWORD }}" --batch keystore.asc > keystore.jks

- name: Build release APK
run: ./gradlew assembleRelease

- name: Upload release Github arm64-v8a APK
uses: actions/upload-artifact@v4
with:
name: release-arm64-v8a-apk-github
path: ./app/build/outputs/apk/github/release/app-github-arm64-v8a-release.apk

- name: Upload release Github armeabi-v7a APK
uses: actions/upload-artifact@v4
with:
name: release-armeabi-v7a-apk-github
path: ./app/build/outputs/apk/github/release/app-github-armeabi-v7a-release.apk

- name: Upload release Github universal APK
uses: actions/upload-artifact@v4
with:
name: release-universal-apk-github
path: ./app/build/outputs/apk/github/release/app-github-universal-release.apk

- name: Upload release GooglePlay arm64-v8a APK
uses: actions/upload-artifact@v4
with:
name: release-arm64-v8a-apk-googleplay
path: ./app/build/outputs/apk/googleplay/release/app-googleplay-arm64-v8a-release.apk

- name: Upload release GooglePlay armeabi-v7a APK
uses: actions/upload-artifact@v4
with:
name: release-armeabi-v7a-apk-googleplay
path: ./app/build/outputs/apk/googleplay/release/app-googleplay-armeabi-v7a-release.apk

- name: Upload release GooglePlay universal APK
uses: actions/upload-artifact@v4
with:
name: release-universal-apk-googleplay
path: ./app/build/outputs/apk/googleplay/release/app-googleplay-universal-release.apk

lint:
needs: build
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ARK Memo: Notes App by ARK Builders

_Implementation in progress_
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
buildFeatures{
buildFeatures {
buildConfig true
viewBinding true
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<application
android:name=".App"
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/java/dev/arkbuilders/arkmemo/graphics/SVG.kt
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ class SVG {
getAttributeValue("", Attributes.VIEW_BOX),
)
}

PATH_TAG -> {
pathCount += 1
strokeColor = getAttributeValue("", Attributes.Path.STROKE)
strokeColor =
getAttributeValue("", Attributes.Path.STROKE)
fill = getAttributeValue("", Attributes.Path.FILL)
pathData = getAttributeValue("", Attributes.Path.DATA)
}
Expand Down Expand Up @@ -164,6 +166,7 @@ class SVG {
},
)
}

SVGCommand.AbsLineTo.CODE -> {
if (commandElements.size > 3) {
strokeColor = commandElements[3]
Expand All @@ -178,6 +181,7 @@ class SVG {
},
)
}

SVGCommand.AbsQuadTo.CODE -> {
if (commandElements.size > 5) {
strokeColor = commandElements[5]
Expand All @@ -192,6 +196,7 @@ class SVG {
},
)
}

else -> {}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ data class GraphicNote(
override var pendingForDelete: Boolean = false,
var thumb: Bitmap? = null,
override var selected: Boolean = false,
override var isForked: Boolean = false,
) : Note, Parcelable
4 changes: 3 additions & 1 deletion app/src/main/java/dev/arkbuilders/arkmemo/models/Note.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package dev.arkbuilders.arkmemo.models

import android.os.Parcelable
import dev.arkbuilders.arklib.data.index.Resource

interface Note {
interface Note : Parcelable {
val title: String
val description: String
var resource: Resource?
var pendingForDelete: Boolean
var selected: Boolean
var isForked: Boolean
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ data class TextNote(
override var resource: Resource? = null,
override var pendingForDelete: Boolean = false,
override var selected: Boolean = false,
override var isForked: Boolean = false,
) : Note, Parcelable
10 changes: 10 additions & 0 deletions app/src/main/java/dev/arkbuilders/arkmemo/models/VersionsResult.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package dev.arkbuilders.arkmemo.models

import dev.arkbuilders.arklib.ResourceId
import dev.arkbuilders.arkmemo.repo.versions.Version

data class VersionsResult(
val versions: List<Version>,
val parents: Set<ResourceId>,
val children: List<ResourceId>,
)
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ class VoiceNote(
var currentPlayingPos: Int = 0,
var currentMaxAmplitude: Int = 0,
override var selected: Boolean = false,
override var isForked: Boolean = false,
) : Note, Parcelable
Loading