Skip to content

Commit d0d032b

Browse files
committed
add local aar debug
1 parent 6ab13c2 commit d0d032b

11 files changed

Lines changed: 271 additions & 27 deletions

File tree

.acside/editor/openedFiles.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"allFiles": [
3+
{
4+
"file": "/storage/emulated/0/AndroidIDEProjects/Code Snap/.github/workflows/android.yml",
5+
"selection": {
6+
"end": {
7+
"column": 49,
8+
"index": 923,
9+
"line": 44
10+
},
11+
"start": {
12+
"column": 49,
13+
"index": 923,
14+
"line": 44
15+
}
16+
}
17+
}
18+
],
19+
"selectedFile": "/storage/emulated/0/AndroidIDEProjects/Code Snap/.github/workflows/android.yml"
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"allFiles": [
3+
{
4+
"file": "/storage/emulated/0/AndroidIDEProjects/Code Snap/snapcode/build.gradle",
5+
"selection": {
6+
"end": {
7+
"column": 0,
8+
"index": 0,
9+
"line": 0
10+
},
11+
"start": {
12+
"column": 0,
13+
"index": 0,
14+
"line": 0
15+
}
16+
}
17+
}
18+
],
19+
"selectedFile": "/storage/emulated/0/AndroidIDEProjects/Code Snap/snapcode/build.gradle"
20+
}

.github/workflows/android.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,17 @@ jobs:
2929
- name: Build APK
3030
run: ./gradlew assembleDebug
3131

32+
- name: Build AAR
33+
run: ./gradlew bundleDebugAar
34+
3235
- name: Upload APK artifact
3336
uses: actions/upload-artifact@v4
3437
with:
3538
name: app-debug-apk
3639
path: app/build/outputs/apk/debug/app-debug.apk
37-
40+
41+
- name: Upload AAR artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: app-debug-aar
45+
path: app/build/outputs/aar/app-debug.aar

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,5 @@ dependencies {
5555
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
5656
implementation("androidx.appcompat:appcompat:1.7.1")
5757
implementation project(path: ":snapcode")
58+
implementation 'ch.usi.si.seart:java-tree-sitter:1.12.0'
5859
}

app/src/main/java/ir/ninjacoder/code/App.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package ir.ninjacoder.code;
22

33
import android.app.Application;
4+
5+
import ch.usi.si.seart.treesitter.*;
46
import ir.ninjacoder.codesnap.colorhelper.ThemeLoader;
57

68
public class App extends Application {
@@ -9,5 +11,6 @@ public void onCreate() {
911
super.onCreate();
1012
ThemeLoader.init(this);
1113
// TODO: Implement this method
14+
LibraryLoader.load();
1215
}
1316
}

app/src/main/java/ir/ninjacoder/code/MainActivity.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131

3232
public class MainActivity extends AppCompatActivity {
3333
private ActivityMainBinding binding;
34-
private AnimatedVectorDrawable animatedThumb;
35-
private float previousValue = 0;
3634

3735
@Override
3836
protected void onCreate(Bundle savedInstanceState) {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#AndroidIDE: enforce UTF-8 & locale for Gradle daemon
2-
#Sun Nov 02 10:36:11 GMT 2025
2+
#Sun Nov 09 22:57:06 GMT 2025
33
android.suppressUnsupportedCompileSdk=35
44
android.nonTransitiveRClass=false
55
-Dfile.encoding=UTF-8

settings.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ pluginManagement {
33
gradlePluginPortal()
44
google()
55
mavenCentral()
6+
google()
7+
mavenCentral()
8+
gradlePluginPortal()
9+
maven { url 'https://jitpack.io' }
10+
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
11+
612
}
713
}
814

snapcode/build.gradle

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,65 +4,70 @@ plugins {
44
}
55

66
android {
7-
compileSdk 35
87
namespace 'ir.ninjacoder.codesnap'
9-
8+
compileSdk 35
9+
1010
defaultConfig {
1111
minSdk 21
1212
targetSdk 34
1313
versionCode 1
1414
versionName "1.1.1"
15+
consumerProguardFiles "consumer-rules.pro"
1516
}
16-
17+
1718
buildTypes {
1819
release {
1920
minifyEnabled false
2021
}
22+
debug {
23+
minifyEnabled false
24+
}
2125
}
26+
2227
buildFeatures {
2328
viewBinding true
24-
25-
}
26-
lint{
27-
checkReleaseBuilds false
2829
}
29-
lintOptions {
30-
checkReleaseBuilds false
31-
abortOnError false
30+
31+
lint {
32+
checkReleaseBuilds = false
33+
abortOnError = false
3234
}
33-
35+
3436
compileOptions {
3537
sourceCompatibility JavaVersion.VERSION_17
3638
targetCompatibility JavaVersion.VERSION_17
3739
}
3840
}
3941

42+
/* ────────────────
43+
Dependencies
44+
────────────────── */
4045
dependencies {
4146
implementation("com.google.android.material:material:1.14.0-alpha06")
42-
runtimeOnly 'androidx.graphics:graphics-shapes:1.1.0-alpha01'
47+
runtimeOnly 'androidx.graphics:graphics-shapes:1.1.0-alpha01'
4348
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
4449
implementation 'androidx.appcompat:appcompat:1.7.1'
4550
implementation 'org.antlr:antlr4:4.13.2'
4651
implementation 'com.google.code.gson:gson:2.13.1'
52+
4753
implementation("io.noties.markwon:html:4.6.2")
4854
implementation("io.noties.markwon:image:4.6.2")
49-
implementation("com.github.bumptech.glide:glide:5.0.0-rc01")
50-
//annotationProcessor 'io.noties:prism4j-bundler:2.0.0'
51-
implementation 'io.noties.markwon:ext-tasklist:4.6.2'
52-
implementation 'io.noties.markwon:image-glide:4.6.2'
53-
implementation 'io.noties.markwon:core:4.6.2'
54-
// implementation("com.caverock:androidsvg:1.4")
55+
implementation("io.noties.markwon:ext-tasklist:4.6.2")
56+
implementation("io.noties.markwon:image-glide:4.6.2")
57+
implementation("io.noties.markwon:core:4.6.2")
5558
implementation("io.noties.markwon:syntax-highlight:4.6.2") {
56-
57-
exclude group: "org.jetbrains", module: "annotations"
58-
exclude group: "org.jetbrains", module: "annotations-java5"
59-
59+
exclude group: "org.jetbrains", module: "annotations"
60+
exclude group: "org.jetbrains", module: "annotations-java5"
6061
}
62+
63+
implementation("com.github.bumptech.glide:glide:5.0.0-rc01")
6164
}
65+
6266
afterEvaluate {
6367
publishing {
6468
publications {
6569
aar(MavenPublication) {
70+
// خروجی AAR
6671
artifact(bundleReleaseAar)
6772

6873
groupId = 'com.github.HanzoDev1375'

snapcode/src/main/java/ir/ninjacoder/codesnap/widget/CodeEditText.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,4 +681,9 @@ private void drawStickyLineNumber(Canvas canvas) {
681681
+ stickyLineNumberPaint.getTextSize();
682682
canvas.drawText(lineNumber, lineNumberWidth - lineNumberPadding, textY, stickyLineNumberPaint);
683683
}
684+
685+
686+
public interface OnSelectionChangedListener {
687+
void onSelectionChanged(int selStart, int selEnd);
688+
}
684689
}

0 commit comments

Comments
 (0)