Skip to content

Commit

Permalink
Merge pull request #694 from splendo/develop
Browse files Browse the repository at this point in the history
Release 1.2
  • Loading branch information
Daeda88 authored May 10, 2023
2 parents 3faa9b3 + 7317cde commit 1675650
Show file tree
Hide file tree
Showing 1,473 changed files with 23,362 additions and 10,391 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*.{kt,kts}]
max_line_length = 180
ktlint_code_style = ktlint_official
ktlint_ignore_back_ticked_identifier = true

ktlint_standard = enabled
ktlint_standard_no-wildcard-imports = disabled
ktlint_standard_filename = disabled
ktlint_standard_import-ordering = disabled

ktlint_experimental = disabled

10 changes: 6 additions & 4 deletions .github/workflows/emulator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
# remove VM settings as defined for using the IDE
- run: sed -i '' -e '/org.gradle.jvmargs/d' gradle.properties; cat gradle.properties

- name : set up JDK 11
- name : set up JDK 17
uses : actions/setup-java@v3
with :
distribution : 'temurin'
java-version : 11
java-version : 17

- name: Gradle cache
uses: gradle/gradle-build-action@v2
Expand Down Expand Up @@ -69,10 +69,12 @@ jobs:
"permissions",
"location",
"keyboard",
"media",
"links",
"resources",
"review",
"scientific",
"service",
"system",
"test-utils"
]
Expand All @@ -94,11 +96,11 @@ jobs:
!/.gradle
key: build-${{ github.sha }}

- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
java-version: 17

- name: AVD cache
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
# remove VM settings as defined for using the IDE
- run: sed -i '' -e '/org.gradle.jvmargs/d' gradle.properties; cat gradle.properties

- name : set up JDK 11
- name : set up JDK 17
uses : actions/setup-java@v3
with :
distribution : 'temurin'
java-version : 11
java-version : 17

- name: Konan cache
uses: actions/cache@v3
Expand Down
3 changes: 1 addition & 2 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,21 @@ The project uses regular Kotlin code conventions. This includes not creating `co
### Code style verification

This project uses [ktlint](https://github.com/pinterest/ktlint) Kotlin linter with standard rules.
Each component should setup ktlint gradle [plugin](https://github.com/jlleitschuh/ktlint-gradle) in `build.gradle.kts` file:
Each component should setup kotlinter gradle [plugin](https://github.com/jeremymailen/kotlinter-gradle) in `build.gradle.kts` file:

```kotlin
plugins {
id("org.jlleitschuh.gradle.ktlint")
id("org.jmailen.kotlinter")
}
```

You can run `Ktlint Check` configuration from IDE before commit changes to git.
You can run `Lint Kotlin` configuration from IDE before commit changes to git.

#### Formatting

You can run `Ktlint Format` configuration to reformat source code if needed.
You can run `Format Kotlin` configuration to reformat source code if needed.

See ktlint and gradle plugin documentation for more details.
See kotlinter and gradle plugin documentation for more details.

## Frequent issues

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation("com.splendo.kaluga:alerts:1.0.0")
implementation("com.splendo.kaluga:alerts:$kalugaVersion")
}
```

Expand All @@ -87,7 +87,7 @@ repositories {
maven("https://oss.sonatype.org/content/repositories/snapshots/")
}
dependencies {
implementation("com.splendo.kaluga:alerts:1.0.0-SNAPSHOT")
implementation("com.splendo.kaluga:alerts:$kalugaDevelopVersion-SNAPSHOT")
}
```

Expand All @@ -111,6 +111,7 @@ To use kaluga with SwiftUI and/or Combine we have a [repo with Sourcery template
| [links](links/) | Used for decoding url into an object | com.splendo.kaluga:links |
| [location](location/) | Provides the User' geolocation | com.splendo.kaluga:location |
| [logging](logging/) | Shared console logging | com.splendo.kaluga:logging |
| [media](media/) | Playing audio/video | com.splendo.kaluga:media |
| [base-permissions](base-permissions/) | Managing permissions, used in conjunction with modules below | com.splendo.kaluga:base-permissions |
| [bluetooth-permissions](bluetooth-permissions/) | Managing bluetooth permissions | com.splendo.kaluga:bluetooth-permissions |
| [calendar-permissions](calendar-permissions/) | Managing calendar permissions | com.splendo.kaluga:calendar-permissions |
Expand Down
10 changes: 8 additions & 2 deletions adding-a-new-module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
This **project** includes all common dependencies and settings for kaluga module.

# Steps for adding a new module
1. Run gradle task: `./gradlew createNewModule -P module_name=<your-module> -P package_name=<your-package>` from the root directory.
* `package_name` can be omitted if the module and package names are the same.
1. Run gradle task: `./gradlew createNewModule -P module_name=<your-module> -P package_name=<your-package> -P create-test-utils -P create-compose -P create-databinding` from the root directory.
* `package_name` can be omitted if the module and package names are the same. Package name will be prefixed with `com.splendo.kaluga`.
* Only pass `create-test-utils` if you want to also create a `test-utils-<your-module>` with package `com.splendo.kaluga.test.<your-package>`.
* Use `./gradlew createNewTestModule -P module_name=<your-module> -P package_name=<your-package>` to create a `test-utils-<your-module>` for an existing module.
* Only pass `create-compose` if you want to also create a `<your-module>-compose` with package `com.splendo.kaluga.<your-package>.compose`.
* Use `./gradlew createNewComposeModule -P module_name=<your-module> -P package_name=<your-package>` to create a `<your-module>-compose` for an existing module.
* Only pass `create-databinding` if you want to also create a `<your-module>-databinding` with package `com.splendo.kaluga.<your-package>.databinding`.
* Use `./gradlew createNewDataBindingModule -P module_name=<your-module> -P package_name=<your-package>` to create a `<your-module>-databinding` for an existing module.
1. Include your module to kaluga project edit `kaluga/settings.gradle.kts` by adding: `include(":<your-module>")`.
1. Add Unit tests
* [Common Unit Tests](#commonTests)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ plugins {
id("convention.publication")
id("com.android.library")
id("org.jetbrains.dokka")
id("org.jlleitschuh.gradle.ktlint")
id("org.jmailen.kotlinter")
}

/* Multiplatform component */
publishableComponent()
/* Compose component */
composeAndroidComponent()
publishableComponent("%PACKAGE%")

dependencies { }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:theme="@style/Theme.AppCompat">
<activity android:name="com.splendo.kaluga.%PACKAGE%.TestActivity"/>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#instrumentedUnitTests)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#androidLibMain-sources)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#androidLibTests)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#commonMain-sources)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#commonTests)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#iosMain-sources)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#iosTests)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#iosMain-sources)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#iosMain-sources)
15 changes: 15 additions & 0 deletions adding-a-new-module/template/compose/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
plugins {
id("com.android.library")
kotlin("android")
id("jacoco")
id("convention.publication")
id("org.jetbrains.dokka")
id("org.jmailen.kotlinter")
}

composeAndroidComponent("%PACKAGE%")

dependencies {
implementation(project(":base"))
implementation(project("%BASEMODULE%"))
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:theme="@style/Theme.AppCompat">
<activity android:name="com.splendo.kaluga.%PACKAGE%.compose.TestActivity"/>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#instrumentedUnitTests)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2022 Splendo Consulting B.V. The Netherlands
Copyright %YEAR% Splendo Consulting B.V. The Netherlands
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
*/

package com.splendo.kaluga.test.hud
package com.splendo.kaluga.%PACKAGE%

import androidx.appcompat.app.AppCompatActivity

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#androidLibMain-sources)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#androidLibTests)
16 changes: 16 additions & 0 deletions adding-a-new-module/template/databinding/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
id("com.android.library")
kotlin("android")
kotlin("kapt")
id("jacoco")
id("convention.publication")
id("org.jetbrains.dokka")
id("org.jmailen.kotlinter")
}

databindingAndroidComponent("%PACKAGE%")

dependencies {
implementation(project(":base"))
implementation(project("%BASEMODULE%"))
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:theme="@style/Theme.AppCompat">
<activity android:name="com.splendo.kaluga.%PACKAGE%.databinding.TestActivity"/>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#instrumentedUnitTests)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2022 Splendo Consulting B.V. The Netherlands
Copyright %YEAR% Splendo Consulting B.V. The Netherlands
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
*/

package com.splendo.kaluga.test.alerts
package com.splendo.kaluga.%PACKAGE%

import androidx.appcompat.app.AppCompatActivity

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#androidLibMain-sources)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#androidLibTests)

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion adding-a-new-module/template/src/iosMain/kotlin/README.md

This file was deleted.

1 change: 0 additions & 1 deletion adding-a-new-module/template/src/iosTest/kotlin/README.md

This file was deleted.

1 change: 0 additions & 1 deletion adding-a-new-module/template/src/jsMain/kotlin/README.md

This file was deleted.

1 change: 0 additions & 1 deletion adding-a-new-module/template/src/jvmMain/kotlin/README.md

This file was deleted.

26 changes: 26 additions & 0 deletions adding-a-new-module/template/test/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
plugins {
kotlin("multiplatform")
id("jacoco")
id("convention.publication")
id("com.android.library")
id("org.jetbrains.dokka")
id("org.jmailen.kotlinter")
}

publishableComponent("%PACKAGE%")

dependencies { }

kotlin {
sourceSets {
commonMain {
dependencies {
implementation(project(":test-utils-base"))
implementation(project("%BASEMODULE%"))
}
}
commonTest {
dependencies {}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#androidLibMain-sources)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Please check [Documentation](../../../../../README.md#commonMain-sources)
Loading

0 comments on commit 1675650

Please sign in to comment.