@@ -4,23 +4,88 @@ Android library for Bitkit Core bindings.
44
55## Installation
66
7- ### Via JitPack (Recommended)
7+ ### GitHub Packages
88
9- See [ Jitpack.io ] ( https://jitpack.io/ ) .
9+ #### 1. Setup your GitHub credentials
1010
11- ### Via Maven Local (Development)
11+ Create a GitHub PAT (Personal Access Token):
12+ - Go to GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic)
13+ - Generate new token with scopes: ` read:packages ` (and ` repo ` if package/repo is private)
14+ - Copy the token once and use it in the next steps:
15+
16+ Set env vars:
17+ ``` sh
18+ export GITHUB_ACTOR=" your_pat_with_read"
19+ export GITHUB_TOKEN=" your_pat_with_read:packages"
20+ ```
21+
22+ Or add to ` ~/.gradle/gradle.properties ` :
23+ ``` properties
24+ # ~/.gradle/gradle.properties
25+ gpr.user =<your_github_username>
26+ gpr.key =<your_pat_with_read:packages>
27+ ```
28+
29+ #### 2. Add the GitHub Packages repository
1230
1331``` kotlin
1432// settings.gradle.kts
1533dependencyResolutionManagement {
16- repositories {
17- mavenLocal()
18- // ... other repositories
34+ repositoriesMode.set(RepositoriesMode .FAIL_ON_PROJECT_REPOS )
35+ repositories {
36+ google()
37+ mavenCentral()
38+ maven {
39+ url = uri(" https://maven.pkg.github.com/synonymdev/bitkit-core" )
40+ credentials {
41+ username = System .getenv(" GITHUB_ACTOR" ) ? : providers.gradleProperty(" gpr.user" ).orNull
42+ password = System .getenv(" GITHUB_TOKEN" ) ? : providers.gradleProperty(" gpr.key" ).orNull
43+ }
1944 }
45+ }
2046}
47+ ```
48+
49+ #### 3. Declare the dependency
2150
22- // build.gradle.kts
51+ ``` kotlin
52+ // app/build.gradle.kts
2353dependencies {
24- implementation(" com.synonym:bitkit-core-android:LATEST_VERSION" )
54+ implementation(" com.synonym:bitkit-core-android:<VERSION>" )
55+ // example:
56+ // implementation("com.synonym:bitkit-core-android:0.1.0")
2557}
2658```
59+ ### Maven Local (development)
60+
61+ ``` kotlin
62+ // settings.gradle.kts
63+ dependencyResolutionManagement {
64+ repositories {
65+ mavenLocal()
66+ // others
67+ }
68+ }
69+
70+ // build.gradle.kts
71+ dependencies {
72+ implementation(" com.synonym:bitkit-core-android:<LOCAL_VERSION>" )
73+ }
74+ ```
75+
76+ ---
77+
78+ ## Publishing
79+
80+ ** ⚠️ Reminder:** Versions are immutable, bump for each publish.
81+
82+ ### GitHub Actions
83+
84+ Create a GitHub Release with a new tag like ` v0.1.0 ` . The workflow ` gradle-publish.yml ` will publish that version.
85+
86+ ### Terminal
87+
88+ ``` sh
89+ cd bindings/android
90+ ./gradlew publish -Pversion=0.1.0
91+ ```
0 commit comments