Skip to content
Merged
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
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.{yml,yaml}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* text=auto eol=lf
*.bat text eol=crlf
*.png binary
*.jpg binary
*.jpeg binary
*.webp binary
*.jar binary
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches:
- main
- develop
pull_request:

permissions:
contents: read

jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

- name: Make Gradle wrapper executable
run: chmod +x gradlew

- name: Verify and assemble release
run: ./gradlew verifyFoundation :arabickit:assembleRelease --stacktrace

- name: Upload release AAR
uses: actions/upload-artifact@v4
with:
name: arabickit-release-aar
path: arabickit/build/outputs/aar/arabickit-release.aar
if-no-files-found: error
46 changes: 23 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# Gradle files
# Gradle
.gradle/
build/
**/build/

# Local configuration file (sdk path, etc)
local.properties

# Log/OS Files
*.log

# Android Studio generated files and folders
# Android Studio / IntelliJ
.idea/
*.iml
captures/
.externalNativeBuild/
.cxx/
*.aab
*.apk
output-metadata.json

# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
# Local SDK and secrets
local.properties
.env
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
google-services.json

# Android Profiling
# Build outputs
*.apk
*.aab
output-metadata.json

# Logs / profiling
*.log
*.hprof

# OS
.DS_Store
Thumbs.db

# ArabicKit local installer data
.arabickit-backups/
.arabickit-install-logs/
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

All notable changes to ArabicKit will be documented here.

The format follows Keep a Changelog, and releases will follow Semantic Versioning after the first stable API is defined.

## [Unreleased]

## [0.1.0] - 2026-08-02

### Added

- Android library foundation.
- Arabic normalization options.
- Arabic-aware normalized search.
- Three-way decimal numeral conversion.
- Dependency-free XML sample app.
- Unit tests, Lint verification, and GitHub Actions CI.
- English and Arabic project documentation.
7 changes: 7 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Code of Conduct

ArabicKit contributors are expected to communicate respectfully, discuss code rather than people, welcome good-faith questions, and avoid harassment or discrimination.

Maintainers may edit or remove abusive, off-topic, private, or security-sensitive content. Repeated harmful behavior can lead to participation restrictions.

For private conduct reports, use the maintainer contact method listed in `SECURITY.md`.
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Contributing to ArabicKit

Thank you for helping improve Arabic text support on Android.

## Before opening a pull request

1. Create or reference an issue for non-trivial changes.
2. Branch from `develop`.
3. Keep each pull request focused.
4. Add tests for behavior changes.
5. Run:

```powershell
.\gradlew.bat verifyFoundation
```

## Branch names

- `feature/<name>`
- `fix/<name>`
- `docs/<name>`
- `chore/<name>`

## Commit style

Use concise imperative messages, for example:

- `feat: add configurable hamza normalization`
- `fix: preserve non-decimal Arabic symbols`
- `docs: clarify search behavior`

## API principles

Arabic normalization can change meaning. New transformations must be configurable, documented, and covered by Arabic-language test cases.
72 changes: 71 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,72 @@
# ArabicKit
Production-ready Kotlin toolkit for Arabic text normalization, search, numerals, highlighting, and RTL utilities on Android.

Production-ready Kotlin utilities for Arabic text normalization, search, and numeral conversion on Android.

> ArabicKit `0.1.0` is the first public foundation release. The API is tested, but `0.x` releases may still evolve before the first stable release.

## Current capabilities

- Remove Arabic diacritics and Quranic annotation marks.
- Remove tatweel.
- Normalize alef variants and alef maksura.
- Normalize whitespace and Latin casing.
- Search through normalized Arabic text.
- Convert Western, Arabic-Indic, and Eastern Arabic-Indic digits.
- Java-friendly APIs through `@JvmStatic` and `@JvmOverloads`.
- A dependency-free Android sample app.
- Unit tests, Android Lint, and GitHub Actions CI.

## Modules

- `:arabickit` — the Android library.
- `:sample` — a small XML + ViewBinding demonstration app.

## Local verification

```bash
./gradlew verifyFoundation
```

On Windows:

```powershell
.\gradlew.bat verifyFoundation
```

## Quick usage

```kotlin
val normalized = ArabicNormalizer.normalize("إِنَّ الــلَّهَ غَفُورٌ")
// "ان الله غفور"

val matches = ArabicSearch.contains(
text = "إِنَّ اللَّهَ غَفُورٌ",
query = "ان الله",
)
// true

val western = ArabicNumerals.convert(
input = "الإصدار ٢٠٢٦",
target = ArabicNumeralSystem.WESTERN,
)
// "الإصدار 2026"
```

## Compatibility

- Android minSdk 24
- compileSdk 37
- Java bytecode target 17
- Kotlin support is provided by Android Gradle Plugin built-in Kotlin.

## Project status

ArabicKit is preparing the public `0.1.0` release. See [ROADMAP.md](ROADMAP.md) and [CHANGELOG.md](CHANGELOG.md).

## Contributing

Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening an issue or pull request.

## License

Apache License 2.0. See [LICENSE](LICENSE).
33 changes: 33 additions & 0 deletions README_AR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ArabicKit — العربية

مكتبة Kotlin إنتاجية لمعالجة النص العربي والبحث وتحويل الأرقام داخل تطبيقات Android.

> الإصدار `0.1.0` هو أول إصدار تأسيسي عام للمكتبة. الواجهات الحالية مختبرة، لكن إصدارات `0.x` قد تتطور قبل الوصول إلى أول إصدار مستقر.

## الإمكانات الحالية

- إزالة التشكيل وعلامات الضبط القرآنية.
- إزالة التطويل.
- توحيد أشكال الألف والألف المقصورة.
- تنظيم المسافات وحالة الأحرف اللاتينية.
- البحث بعد التطبيع.
- التحويل بين الأرقام الغربية والعربية والهندية الشرقية.
- واجهات سهلة للاستخدام من Kotlin وJava.
- تطبيق عينة مبني بـXML وViewBinding.
- اختبارات آلية وAndroid Lint وGitHub Actions.

## التحقق محليًا

على Windows:

```powershell
.\gradlew.bat verifyFoundation
```

## حالة المشروع

المشروع يجهّز الآن الإصدار العام الأول `0.1.0`. قد تتطور واجهات `0.x` قبل الوصول إلى الإصدار المستقر الأول.

## الرخصة

Apache License 2.0.
30 changes: 30 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Roadmap

## 0.1.0 — Foundation

- [x] Deterministic normalization.
- [x] Arabic-aware contains and equality checks.
- [x] Numeral conversion.
- [x] Unit tests and CI.
- [x] API review.
- [ ] Publish the first public release.

## 0.2.0 — Search ranges and highlighting

- Original-text index mapping.
- Safe match ranges.
- Android `Spannable` highlighting.
- Multi-match support.

## 0.3.0 — Advanced Arabic utilities

- Configurable hamza handling.
- Tokenization helpers.
- Locale-safe sorting helpers.
- Performance benchmarks.

## 1.0.0 — Stable API

- Compatibility guarantees.
- Published Maven artifact.
- Expanded documentation and sample coverage.
13 changes: 13 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Security Policy

## Supported versions

Only the latest published ArabicKit release and the current `develop` branch receive security fixes during the `0.x` phase.

## Reporting a vulnerability

Do not open a public issue for a vulnerability or exposed secret.

Use GitHub private vulnerability reporting when it is enabled for this repository. Include reproduction steps, affected versions, impact, and any suggested mitigation.

Please allow the maintainer reasonable time to investigate before public disclosure.
40 changes: 40 additions & 0 deletions arabickit/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
plugins {
id("com.android.library")
}

group = "io.github.khalid567cpu"
version = "0.1.0"

android {
namespace = "io.github.khalid567cpu.arabickit"
compileSdk = 37

defaultConfig {
minSdk = 24
consumerProguardFiles("consumer-rules.pro")
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

buildFeatures {
buildConfig = false
}

testOptions {
unitTests.isIncludeAndroidResources = false
}

lint {
disable += "AndroidGradlePluginVersion"
abortOnError = true
warningsAsErrors = true
checkReleaseBuilds = true
}
}

dependencies {
testImplementation("junit:junit:4.13.2")
}
1 change: 1 addition & 0 deletions arabickit/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# ArabicKit currently exposes regular Kotlin APIs and requires no consumer keep rules.
2 changes: 2 additions & 0 deletions arabickit/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest />
Loading
Loading