Skip to content

Commit c684cc3

Browse files
devsuaytrindadedev13
authored andcommitted
initial commit
0 parents  commit c684cc3

35 files changed

+1430
-0
lines changed

.github/workflows/android.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Android CI
2+
3+
on:
4+
push:
5+
branches: [ "**" ]
6+
paths-ignore:
7+
- '**/*.md'
8+
pull_request:
9+
branches: [ "**" ]
10+
paths-ignore:
11+
- '**/*.md'
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
name: Build Library
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Check out repository
21+
uses: actions/checkout@v4
22+
23+
- name: Set up JDK 21
24+
uses: actions/setup-java@v4
25+
with:
26+
java-version: '21'
27+
distribution: 'oracle'
28+
cache: gradle
29+
30+
- name: Grant execute permission for gradlew
31+
run: chmod +x gradlew
32+
33+
- name: Validate Gradle wrapper
34+
uses: gradle/actions/wrapper-validation@v4
35+
36+
- name: Build Library Release
37+
run: ./gradlew assembleRelease
38+
39+
- name: Upload build dir
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: library-build-dir
43+
path: build/

.github/workflows/delruns.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Delete old runs
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
days:
7+
description: 'Number of retains days.'
8+
required: true
9+
default: '0'
10+
minimum_runs:
11+
description: 'The minimum runs to keep for each workflow.'
12+
required: true
13+
default: '0'
14+
15+
jobs:
16+
deleteWorkflowRuns:
17+
name: Delete old workflow runs
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Delete workflow runs
21+
uses: Mattraks/delete-workflow-runs@v2.0.6
22+
with:
23+
token: ${{ github.token }}
24+
repository: ${{ github.repository }}
25+
retain_days: ${{ github.event.inputs.days }}
26+
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}

.github/workflows/format_code.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Code Formatter
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
format:
8+
name: Format Kotlin Code with ktfmt
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up JDK 22
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: 'oracle'
19+
java-version: '22'
20+
21+
- name: Download ktfmt
22+
run: |
23+
wget https://github.com/facebook/ktfmt/releases/download/v0.53/ktfmt-0.53-jar-with-dependencies.jar -O ktfmt.jar
24+
25+
- name: Run ktfmt on Kotlin files
26+
run: |
27+
find . -name "*.kt" -exec java -jar ktfmt.jar --google-style {} +
28+
29+
- name: Commit and Push changes
30+
run: |
31+
rm ktfmt.jar
32+
git config --global user.name "trindadedev13"
33+
git config --global user.email "trindadedev13@gmail.com"
34+
git fetch origin ${GITHUB_REF_NAME}:temp
35+
git add .
36+
git commit -m "chore: Format Kotlin Code" -m "format code with ktfmt in github actions"
37+
git rebase temp
38+
git push origin HEAD:${GITHUB_REF_NAME}
39+
env:
40+
TOKEN: ${{ secrets.SUPER_TOKEN }}
41+
continue-on-error: true
42+
43+
format-java:
44+
name: Format Java Code with Google Java Format
45+
runs-on: ubuntu-latest
46+
47+
steps:
48+
- name: Checkout repository
49+
uses: actions/checkout@v4
50+
51+
- name: Set up JDK 22
52+
uses: actions/setup-java@v4
53+
with:
54+
distribution: 'oracle'
55+
java-version: '22'
56+
57+
- name: Download Google Java Format
58+
run: |
59+
wget https://github.com/google/google-java-format/releases/download/v1.24.0/google-java-format-1.24.0-all-deps.jar -O google-java-format.jar
60+
61+
- name: Run Google Java Format in Java files
62+
run: |
63+
find . -name "*.java" -exec java -jar google-java-format.jar --replace {} +
64+
65+
- name: Commit and Push changes
66+
run: |
67+
rm google-java-format.jar
68+
git config --global user.name "trindadedev13"
69+
git config --global user.email "trindadedev13@gmail.com"
70+
git fetch origin ${GITHUB_REF_NAME}:temp
71+
git add .
72+
git commit -m "chore: Format Java Code" -m "format code with google java format in github actions"
73+
git rebase temp
74+
git push origin HEAD:${GITHUB_REF_NAME}
75+
env:
76+
TOKEN: ${{ secrets.SUPER_TOKEN }}
77+
continue-on-error: true

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# The Robok Software Developement Kit

build.gradle.kts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
plugins {
2+
alias(libs.plugins.android.library)
3+
alias(libs.plugins.kotlin.android)
4+
`maven-publish`
5+
}
6+
7+
group = "org.robok"
8+
version = libs.versions.lib.version.get()
9+
10+
android {
11+
namespace = "org.robok"
12+
compileSdk = libs.versions.android.compileSdk.get().toInt()
13+
buildToolsVersion = libs.versions.android.buildToolsVersion.get()
14+
15+
defaultConfig {
16+
minSdk = libs.versions.android.minSdk.get().toInt()
17+
18+
ndk {
19+
abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
20+
}
21+
}
22+
23+
buildTypes {
24+
release {
25+
isMinifyEnabled = false
26+
}
27+
}
28+
29+
compileOptions {
30+
sourceCompatibility = JavaVersion.VERSION_21
31+
targetCompatibility = JavaVersion.VERSION_21
32+
}
33+
34+
kotlin {
35+
jvmToolchain(21)
36+
}
37+
}
38+
39+
dependencies {
40+
implementation("androidx.annotation:annotation:1.9.1")
41+
}
42+
43+
afterEvaluate {
44+
publishing {
45+
publications {
46+
register("mavenRelease", MavenPublication::class) {
47+
groupId = "org.robok"
48+
artifactId = "robok-sdk"
49+
version = libs.versions.lib.version.get()
50+
from(components["release"])
51+
}
52+
}
53+
}
54+
}

gradle.properties

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Project-wide Gradle settings.
2+
# IDE (e.g. Android Studio) users:
3+
# Gradle settings configured through the IDE *will override*
4+
# any settings specified in this file.
5+
# For more details on how to configure your build environment visit
6+
# http://www.gradle.org/docs/current/userguide/build_environment.html
7+
# Specifies the JVM arguments used for the daemon process.
8+
# The setting is particularly useful for tweaking memory settings.
9+
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10+
# When configured, Gradle will run in incubating parallel mode.
11+
# This option should only be used with decoupled projects. For more details, visit
12+
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
13+
# org.gradle.parallel=true
14+
# AndroidX package structure to make it clearer which packages are bundled with the
15+
# Android operating system, and which are packaged with your app's APK
16+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
17+
android.useAndroidX=true
18+
# Kotlin code style for this project: "official" or "obsolete":
19+
kotlin.code.style=official
20+
# Enables namespacing of each library's R class so that its R class includes only the
21+
# resources declared in the library itself and none from the library's dependencies,
22+
# thereby reducing the size of the R class for that library
23+
android.nonTransitiveRClass=true

gradle/libs.versions.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[versions]
2+
agp = "8.8.0"
3+
android-minSdk = "21"
4+
android-compileSdk = "35"
5+
android-buildToolsVersion = "35.0.0"
6+
lib-version = "1.0.0"
7+
8+
kotlin = "2.1.0"
9+
10+
[libraries]
11+
12+
[plugins]
13+
android-library = { id = "com.android.library", version.ref = "agp" }
14+
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }

gradle/wrapper/gradle-wrapper.jar

42.6 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)