Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated dev #50

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
1 change: 0 additions & 1 deletion .editorconfig
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This configuration is used by ktlint when spotless invokes it
[*]
charset = utf-8
ij_disabled_rules=no-wildcard-imports,import-ordering,trailing-comma
end_of_line = crlf
indent_size = 4
indent_style = space
Expand Down
Empty file modified .github/ISSUE_TEMPLATE/bug_report.yml
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/docs_issue.yml
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/feature_request.yml
100644 → 100755
Empty file.
Empty file modified .github/ci-gradle.properties
100644 → 100755
Empty file.
Empty file modified .github/pull_request_template.md
100644 → 100755
Empty file.
Empty file modified .github/renovate.json
100644 → 100755
Empty file.
44 changes: 18 additions & 26 deletions .github/workflows/main.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
cancel-previous:
name: Cancel Previous
name: Cancel Previous Jobs
permissions:
contents: read
actions: write
Expand All @@ -22,7 +22,7 @@ jobs:
access_token: ${{ github.token }}

lint:
name: Linting
name: Lint
permissions:
contents: read
runs-on: ubuntu-latest
Expand All @@ -40,15 +40,15 @@ jobs:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: Test
- name: Lint
run: make clean lint

test:
name: Test
build:
name: Build
permissions:
contents: read
runs-on: ubuntu-latest
needs: cancel-previous
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -62,15 +62,17 @@ jobs:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: Test
run: make clean test
- name: APK
run: make clean assemble
- name: Bundle
run: make clean bundle

build:
name: Build
test:
name: Test (unit)
permissions:
contents: read
runs-on: ubuntu-latest
needs: cancel-previous
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -84,18 +86,16 @@ jobs:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: APK
run: make clean assemble
- name: Bundle
run: make clean bundle
- name: Test
run: make clean test

androidTest:
name: Android Test
name: Test (instrumented)
permissions:
contents: read
runs-on: macos-latest
timeout-minutes: 45
needs: cancel-previous
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -109,12 +109,4 @@ jobs:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: Instrumentation Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29 # current max API level supported 29
arch: x86_64
disable-animations: true
disk-size: 6000M
heap-size: 600M
script: make clean android-test

Empty file modified .github/workflows/qodana.yml
100644 → 100755
Empty file.
16 changes: 16 additions & 0 deletions .github/workflows/todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Todo 🚧

on:
push:
branches:
- main
- dev

jobs:
todo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: TODO to Issue
uses: alstr/[email protected]
id: todo
2 changes: 2 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ local.properties
# Android Studio captures folder
captures/

# Generated Kotlin folder
.kotlin

Empty file modified CONTRIBUTING.MD
100644 → 100755
Empty file.
Empty file modified Makefile
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


[![Qodana](https://github.com/droidconKE/chai/actions/workflows/qodana.yml/badge.svg)](https://github.com/droidconKE/chai/actions/workflows/qodana.yml)
[![Chai CI 🍵](https://github.com/droidconKE/chai/actions/workflows/main.yml/badge.svg)](https://github.com/droidconKE/chai/actions/workflows/main.yml)

Expand Down
15 changes: 6 additions & 9 deletions build.gradle.kts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
buildscript {

}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id ("com.android.application") version ("8.2.2") apply false
id ("com.android.library") version ("8.2.2") apply false
id ("org.jetbrains.kotlin.android") version ("2.0.0") apply false
id("org.jetbrains.kotlin.jvm") version "2.0.0" apply false
id("com.google.devtools.ksp") version "2.0.0-1.0.23" apply false
id("com.android.test") version "8.2.2" apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.jetbrains.kotlin.android) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.jetbrains.kotlin.jvm) apply false
alias(libs.plugins.jetbrains.compose) apply false
}
46 changes: 1 addition & 45 deletions chai/.gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,45 +1 @@
# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/
out/
build/

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

# Eclipse project files
.classpath
.project

# Windows thumbnail db
.DS_Store

# IDEA/Android Studio project files, because
# the project can be imported from settings.gradle.kts
*.iml
.idea/*
!.idea/copyright
# Keep the code styles.
!/.idea/codeStyles
/.idea/codeStyles/*
!/.idea/codeStyles/Project.xml
!/.idea/codeStyles/codeStyleConfig.xml

# Gradle cache
.gradle

# Sandbox stuff
_sandbox

# Android Studio captures folder
captures/
/build
Empty file removed chai/README.md
Empty file.
90 changes: 31 additions & 59 deletions chai/build.gradle.kts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,82 +1,54 @@
/**
* Copyright 2023 droidcoke
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
alias(libs.plugins.android.library)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.jetbrains.compose)
}

android {
namespace = "com.droidconke.chaidemo"
compileSdk = 33
namespace = "com.droidconke.chai"
compileSdk = 34

defaultConfig {
minSdk = 26

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFile("consumer-rules.pro")
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
getByName("release") {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = "11"
}


buildFeatures {
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion = "1.5.14"
jvmTarget = "1.8"
}
}

dependencies {
val composeBom = platform("androidx.compose:compose-bom:2024.01.00")
implementation(composeBom)

implementation("androidx.core:core-ktx")
implementation("androidx.lifecycle:lifecycle-runtime-ktx")
implementation("androidx.activity:activity-compose")

implementation("androidx.compose.ui:ui")

implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")

debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")


androidTestImplementation(composeBom)

testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit")
androidTestImplementation("androidx.test.espresso:espresso-core")
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
}
implementation(libs.androidx.core.ktx)
implementation(platform(libs.androidx.compose.bom))
implementation (libs.material3)
implementation(libs.androidx.appcompat)
implementation(libs.material)
implementation(libs.androidx.runtime.android)
implementation(libs.androidx.material3.android)
implementation(libs.androidx.ui.tooling.preview.android)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)

// compose
implementation(platform(libs.androidx.compose.bom))
implementation(compose.foundation)
}
Empty file modified chai/consumer-rules.pro
100644 → 100755
Empty file.
40 changes: 20 additions & 20 deletions chai/proguard-rules.pro
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.droidconke.chai

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.droidconke.chai.test", appContext.packageName)
}
}
Loading
Loading