Skip to content

Commit

Permalink
prepare for release: dokka, license, targets, detekt (#28)
Browse files Browse the repository at this point in the history
* lifecycle: supports targets
  tvosX64()
  tvosSimulatorArm64()
  tvosArm64()
  watchosArm32()
  watchosArm64()
  watchosX64()
  watchosSimulatorArm64()

* lifecycle: supports targets
  tvosX64()
  tvosSimulatorArm64()
  tvosArm64()
  watchosArm32()
  watchosArm64()
  watchosX64()
  watchosSimulatorArm64()

* lifecycle: supports targets
  tvosX64()
  tvosSimulatorArm64()
  tvosArm64()
  watchosArm32()
  watchosArm64()
  watchosX64()
  watchosSimulatorArm64()

* add rememberCloseableOnRoute

* add rememberCloseableOnRoute

* add rememberCloseableOnRoute

* replace DestinationId with StackEntryId

* fix dokka

* org.gradle.jvmargs=-Xmx8g

* POM_INCEPTION_YEAR=2024

* fully qualified import for WeakReference
Kotlin/dokka#3403

* fix dokka

* dokka: suppress all internal packages

* dokka: suppress all internal packages

* LifecycleControllerEffect to non-internal pkg

* externalDocumentationLink {
        url = URL("https://hoc081098.github.io/kmp-viewmodel/docs/0.x/API/")
        packageListUrl = URL("https://hoc081098.github.io/kmp-viewmodel/docs/0.x/API/package-list")
      }

* fix dokka

* LifecycleDestroyedException

* LifecycleDestroyedException

* license

* license

* docs

* org.gradle.jvmargs=-Xmx4g

* update CI

* dokka

* InternalNavigationApi

* InternalNavigationApi

* InternalNavigationApi

* dump

* dump

* detekt

* detekt

* update ci [skip ci]

* TODO: Issue Kotlin/dokka#3368 and Kotlin/dokka#2037

* changelog [skip ci]
  • Loading branch information
hoc081098 authored Feb 7, 2024
1 parent e45348c commit b00289f
Show file tree
Hide file tree
Showing 99 changed files with 2,068 additions and 375 deletions.
58 changes: 53 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
run: chmod +x ./gradlew

- name: Build
run: ./gradlew :lifecycle:assemble :khonshu-navigation-core:assemble :navigation:assemble --stacktrace
run: ./gradlew :lifecycle:build :khonshu-navigation-core:build :navigation:build --stacktrace

- name: Kover Xml Report
run: ./gradlew :koverXmlReport
Expand All @@ -79,15 +79,63 @@ jobs:
name: test-report
path: build/reports/tests/allTests/

checks:
name: Checks (spotless, detekt and binary-compatibility-validator)
strategy:
matrix:
os: [ macos-11 ]
runs-on: ${{ matrix.os }}
timeout-minutes: 45
if: ${{ github.repository == 'hoc081098/solivagant' }}
steps:
- uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'

- name: Cache gradle, wrapper and buildSrc
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ matrix.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
restore-keys: |
${{ matrix.os }}-gradle-
- name: Cache konan
uses: actions/cache@v3
with:
path: |
~/.konan/cache
~/.konan/dependencies
~/.konan/kotlin-native-macos*
~/.konan/kotlin-native-mingw*
~/.konan/kotlin-native-windows*
~/.konan/kotlin-native-linux*
~/.konan/kotlin-native-prebuilt-macos*
~/.konan/kotlin-native-prebuilt-mingw*
~/.konan/kotlin-native-prebuilt-windows*
~/.konan/kotlin-native-prebuilt-linux*
key: ${{ matrix.os }}-konan-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ matrix.os }}-konan-
- name: Make gradlew executable
run: chmod +x ./gradlew

- name: spotlessCheck, detekt and apiCheck
run: ./gradlew spotlessCheck detekt apiCheck --stacktrace

publish:
needs: [ build ]
# if: ${{ github.ref == 'refs/heads/master' && github.repository == 'hoc081098/solivagant' }}
if: ${{ false }}
needs: [ build, checks ]
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'hoc081098/solivagant' }}
strategy:
matrix:
os: [ macos-11 ]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
run: chmod +x ./gradlew

- name: Build release
run: ./gradlew :viewmodel:assemble :viewmodel-savedstate:assemble :viewmodel-compose:assemble
run: ./gradlew :lifecycle:assemble :khonshu-navigation-core:assemble :navigation:assemble --stacktrace

- name: Publish release
run: ./gradlew publish --stacktrace
Expand Down
14 changes: 11 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@

## [Unreleased] - TBD

## [0.0.1] - Feb 11, 2023
## [0.0.1] - Feb 7, 2024

- Initial release.
- Initial release of `solivagant` 🔆.
A Compose Multiplatform Navigation - 🌸 Pragmatic, type safety navigation for Compose Multiplatform.
Based on [Freeletics Khonshu Navigation](https://freeletics.github.io/khonshu/navigation/get-started/).

[Unreleased]: https://github.com/hoc081098/solivagant/compare/0.6.1...HEAD
- Dependencies
- [Kotlin `1.9.22`](https://github.com/JetBrains/kotlin/releases/tag/v1.9.22).
- [JetBrains Compose Multiplatform `1.5.12`](https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.5.12).
- [KMP ViewModel `0.6.2`](https://github.com/hoc081098/kmp-viewmodel/releases/tag/0.6.2).
- [KotlinX Coroutines `1.7.3`](https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.7.3).
- [KotlinX Collections Immutable `0.3.7`](https://github.com/Kotlin/kotlinx.collections.immutable/releases/tag/v0.3.7).

[Unreleased]: https://github.com/hoc081098/solivagant/compare/0.0.1...HEAD

[0.0.1]: https://github.com/hoc081098/solivagant/releases/tag/0.0.1
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ navigator.navigateBackTo<MainScreenRoute>(inclusive = false)
- [ ] Review supported targets
- [ ] Polish and improve the implementation and the public API
- [ ] Support transition when navigating
- [ ] Support more targets such as wasm, watchOS, tvOS, etc...

## License

Expand Down
65 changes: 33 additions & 32 deletions detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ build:
maxIssues: 0
excludeCorrectable: false
weights:
# complexity: 2
# LongParameterList: 1
# style: 1
# comments: 1
# complexity: 2
# LongParameterList: 1
# style: 1
# comments: 1

config:
validation: true
Expand Down Expand Up @@ -34,11 +34,11 @@ processors:
console-reports:
active: true
exclude:
- 'ProjectStatisticsReport'
- 'ComplexityReport'
- 'NotificationReport'
- 'FindingsReport'
- 'FileBasedFindingsReport'
- 'ProjectStatisticsReport'
- 'ComplexityReport'
- 'NotificationReport'
- 'FindingsReport'
- 'FileBasedFindingsReport'
# - 'LiteFindingsReport'

output-reports:
Expand Down Expand Up @@ -66,27 +66,27 @@ comments:
endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)'
KDocReferencesNonPublicProperty:
active: false
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
OutdatedDocumentation:
active: false
matchTypeParameters: true
matchDeclarationsOrder: true
allowParamOnConstructorProperties: false
UndocumentedPublicClass:
active: false
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
searchInNestedClass: true
searchInInnerClass: true
searchInInnerObject: true
searchInInnerInterface: true
searchInProtectedClass: false
UndocumentedPublicFunction:
active: false
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
searchProtectedFunction: false
UndocumentedPublicProperty:
active: false
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
searchProtectedProperty: false

complexity:
Expand Down Expand Up @@ -121,7 +121,7 @@ complexity:
- 'with'
LabeledExpression:
active: false
ignoredLabels: []
ignoredLabels: [ ]
LargeClass:
active: true
threshold: 600
Expand All @@ -132,9 +132,9 @@ complexity:
active: true
functionThreshold: 6
constructorThreshold: 7
ignoreDefaultParameters: false
ignoreDefaultParameters: true
ignoreDataClasses: true
ignoreAnnotatedParameter: []
ignoreAnnotatedParameter: [ ]
MethodOverloading:
active: false
threshold: 6
Expand All @@ -158,14 +158,14 @@ complexity:
active: false
StringLiteralDuplication:
active: false
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
threshold: 3
ignoreAnnotation: true
excludeStringsWithLessThan5Characters: true
ignoreStringsRegex: '$^'
TooManyFunctions:
active: true
excludes: ['**/test/**', '**/*Test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/*Test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
thresholdInFiles: 11
thresholdInClasses: 11
thresholdInInterfaces: 11
Expand Down Expand Up @@ -240,7 +240,7 @@ exceptions:
- 'toString'
InstanceOfCheckForException:
active: true
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
NotImplementedDeclaration:
active: false
ObjectExtendsThrowable:
Expand All @@ -266,7 +266,7 @@ exceptions:
active: false
ThrowingExceptionsWithoutMessageOrCause:
active: true
excludes: ['**/test/**', '**/*Test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/*Test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
exceptions:
- 'ArrayIndexOutOfBoundsException'
- 'Exception'
Expand All @@ -281,7 +281,7 @@ exceptions:
active: true
TooGenericExceptionCaught:
active: true
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
exceptionNames:
- 'ArrayIndexOutOfBoundsException'
- 'Error'
Expand Down Expand Up @@ -319,7 +319,7 @@ naming:
enumEntryPattern: '[A-Z][_a-zA-Z0-9]*'
ForbiddenClassName:
active: false
forbiddenName: []
forbiddenName: [ ]
FunctionMaxLength:
active: false
maximumFunctionNameLength: 30
Expand Down Expand Up @@ -389,10 +389,10 @@ performance:
threshold: 3
ForEachOnRange:
active: true
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
SpreadOperator:
active: true
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
UnnecessaryPartOfBinaryExpression:
active: false
UnnecessaryTemporaryInstantiation:
Expand Down Expand Up @@ -445,7 +445,7 @@ potential-bugs:
- 'kotlin.sequences.Sequence'
- 'kotlinx.coroutines.flow.*Flow'
- 'java.util.stream.*Stream'
ignoreFunctionCall: []
ignoreFunctionCall: [ ]
ImplicitDefaultLocale:
active: true
ImplicitUnitReturnType:
Expand All @@ -459,13 +459,13 @@ potential-bugs:
active: true
LateinitUsage:
active: false
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
ignoreOnClassesPattern: ''
MapGetWithNotNullAssertionOperator:
active: true
MissingPackageDeclaration:
active: false
excludes: ['**/*.kts']
excludes: [ '**/*.kts' ]
NullCheckOnMutableProperty:
active: false
NullableToStringCall:
Expand All @@ -484,7 +484,7 @@ potential-bugs:
active: true
UnsafeCallOnNullableType:
active: true
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
UnsafeCast:
active: true
UnusedUnaryOperator:
Expand Down Expand Up @@ -531,7 +531,7 @@ style:
active: false
ForbiddenImport:
active: false
imports: []
imports: [ ]
forbiddenPatterns: ''
ForbiddenMethodCall:
active: false
Expand All @@ -542,7 +542,7 @@ style:
value: 'kotlin.io.println'
ForbiddenSuppress:
active: false
rules: []
rules: [ ]
ForbiddenVoid:
active: true
ignoreOverridden: false
Expand All @@ -551,13 +551,13 @@ style:
active: true
ignoreOverridableFunction: true
ignoreActualFunction: true
excludedFunctions: []
excludedFunctions: [ ]
LoopWithTooManyJumpStatements:
active: true
maxJumpCount: 1
MagicNumber:
active: true
excludes: ['**/test/**', '**/*Test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**', '**/*.kts']
excludes: [ '**/test/**', '**/*Test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**', '**/*.kts' ]
ignoreNumbers:
- '-1'
- '0'
Expand Down Expand Up @@ -674,6 +674,7 @@ style:
UnusedPrivateMember:
active: true
allowedNames: '(_|ignored|expected|serialVersionUID|[a-zA-Z]+Preview)'
ignoreAnnotated: [ 'Preview', 'androidx.compose.ui.tooling.preview.Preview' ]
UseAnyOrNoneInsteadOfFind:
active: true
UseArrayLiteralsInAnnotations:
Expand Down
5 changes: 2 additions & 3 deletions docs/multiplatform.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Supported targets

- `android`.
- `jvm` (must add `kotlinx-coroutines-swing`/`kotlinx-coroutines-javafx` to your dependencies to
- `jvm` (`Desktop`) (must add `kotlinx-coroutines-swing`/`kotlinx-coroutines-javafx` to your dependencies to
make sure `Dispatchers.Main` available).

> [!NOTE]
Expand All @@ -13,8 +13,7 @@
> If you are using `JetBrains Compose Multiplatform` and targeting `Desktop`, you should provide `org.jetbrains.kotlinx:kotlinx-coroutines-swing`.
- `js` (`IR`).

- `Darwin` targets:
- `iosArm64`, `iosX64`, `iosSimulatorArm64`.
- `watchosArm32`, `watchosArm64`, `watchosX64`, `watchosSimulatorArm64`.
- `tvosX64`, `tvosSimulatorArm64`, `tvosArm64`.
- `macosX64`, `macosArm64`.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ kotlin.incremental=true
GROUP=io.github.hoc081098
# HEY! If you change the major version here be sure to update publish-release.yaml doc target folder!
VERSION_NAME=0.0.1-SNAPSHOT
POM_INCEPTION_YEAR=2023
POM_INCEPTION_YEAR=2024

POM_URL=https://github.com/hoc081098/solivagant
POM_SCM_URL=https://github.com/hoc081098/solivagant
Expand Down
Loading

0 comments on commit b00289f

Please sign in to comment.