20 Commits
Author SHA1 Message Date
Patrick Steiger adc3b0df53 Get rid of suppressions for "invisible_reference" and "invisible_member"
For accessing internal declarations from other modules (e.g. access `rib-base` internals from `rib-test`), we are currently suppressing compiler errors with `@file:Suppress("invisible_reference", "invisible_member")`

A better approach is to:
1. Create an `internal` opt-in annotation.
2. Make the "accessible to friend modules" component `public`
3. Mark the (now public) component with the opt-in annotation.
4. Opt-in to the annotation from `build.gradle`.

Because the new annotation is `internal`, it cannot be normally accessed from external modules. But Gradle can see it if it's part of the source set.

This makes the internal visibility of those friend-modules APIs even stricter, since consumers now cannot just suppress `"invisible_reference"` and `"invisible_member"` to directly access the friend-module API. Plus, we get rid of the hacky suppressions in our codebase.
2023-09-21 21:20:42 -03:00
James Barr 891865cfd3 Revert JVM version to 1.8 (#616)
* Revert JVM version to 1.8
* Add tools jar
2023-09-20 13:30:48 -04:00
Patrick Steiger 27d8eba3fc Make use of convention plugins and version catalogs 2023-05-18 14:54:39 -03:00
Patrick Steiger 5b9b66e54d Make use of jvmToolchain for compiling the project.
This allows for a more repeatable, predictable build between different local configurations.
2023-05-16 18:01:40 -03:00
Patrick Steiger 2d77205544 Bump Kotlin, Gradle, and other dependencies versions.
Kotlin 1.7.10 -> 1.8.20
Gradle 7.3.3 -> 8.1.1
AndroidX Lifecycle ViewModel Compose 1.0.0-alpha05 -> 2.5.1
AndroidX Activity 1.3.0-alpha08 -> 1.7.0
AndroidX Activity KTX 1.3.0-beta02 -> 1.7.0
AndroidX Activity Compose 1.3.0-beta02 -> 1.7.0
Compose compiler 1.3.0 -> 1.4.6
Compose libraries 1.2.1 -> 1.4.0
Java version 1.8 -> 11
IntelliJ plugin 1.11.0 -> 1.13.1 (1.13.2 onwards fails test `ribGenerators_shouldGenerateClassesThatCompiler` for reasons beyond my understanding)
AGP 7.2.2 -> 7.4.2 (8.0 not supported in IJ 2023.1 bundled Android plugin)
gradle-maven-publish 0.18.0 -> 0.25.2

### Additional changes

- Move package string from manifests to `android.namespace` in Gradle build scripts.
- Remove `targetSdk` from Android libraries (only applications should provide it)
- Remove `buildToolsVersion`.
- `compileSdkVersion`, `minSdkVersion`, `targetSdkVersion` swapped to `compileSdk`, `minSdk`, `targetSdk`.
- Disablement of `buildConfig` is now done by `buildFeatures.buildConfig = false` instead of in the project `build.gradle`.
- Added `exported="true"` in demo Android projects activities.
- `-Xfriend-paths` `kotlinc` option seemingly only works now if we use `@file:Suppress("invisible_reference", "invisible_member")` in files that access internal components.
- `androidx.lifecycle.ViewTreeLifecycleOwner(View, LifecycleOwner)` has been replaced with `View.setViewTreeLifecycleOwner(LifecycleOwner)`.
- Removed unnecessary dependencies on Kotlin stdlib, as the Kotlin JVM plugin automatically adds it. For reasons beyond my understanding, removing it from `android/libraries/rib-test` fails gradle sync with the following error, so it's the only place it's still kept.
```
com.intellij.openapi.externalSystem.model.ExternalSystemException: Could not resolve all dependencies for configuration ':libraries:rib-coroutines:testCompileClasspath'.
Cannot change dependencies of dependency configuration ':libraries:rib-test:api' after it has been included in dependency resolution.
```
2023-04-28 20:32:40 -03:00
sergey.smykovskyi 9aaf225144 Renamed loggedIn package -> loggedin
Renamed `loggedOut` package -> `loggedout`
 Renamed `offGame` package -> `offgame`
 Renamed `ticTacToe` package -> `tictactoe`
2023-04-26 11:10:58 -07:00
davissuber a32142834d Enable explicit api mode for Kotlin libraries (#561)
This commit follows the example of #548 and satisfies #545 by enabling the explicit api mode for the following library modules:

- rib-debug-utils
- rib-router-navigator
- rib-test
- rib-compiler-app
- rib-android-compose
- rib-android-code
- rib-android
- rib-screen-stack-base
- rib-workflow-test
- rib-workflow
2023-04-25 17:42:43 -03:00
James Barr beb5ccd149 Migrate gradle-maven-push to gradle-maven-publish-plugin (#477) 2021-09-17 11:06:06 -07:00
James Barr bd8f05fc0f Followup fixes for Kotlin RIBs (#448) 2021-05-11 22:30:26 -07:00
James Barr 026eae1e12 Convert rib-base to Kotlin 2021-04-16 12:39:06 -07:00
James Barr 7706c77164 Convert rib-debug-utils to Kotlin 2021-03-26 14:59:41 -07:00
James Barr 7353e2658f Rename RouterDebugUtils to .kt in kotlin srcs 2021-03-26 14:53:36 -07:00
James Barr cb51d73da2 Integrate Spotless into build (#415)
* Integrate Spotless in build

* Update CONTRIBUTING.md

* Move improperly placed copyright comments

* Update copyright indent

* Don't format test fixtures

* Run spotlessApply over the whole repo

* Remove checkstyle configs

* Run spotlessCheck on CI
2021-03-24 18:45:35 -07:00
James Barr b290824844 Align rib-base with internal version (#402)
* Remove Component type parameter from Router

* Add RibEvents and related classes for tooling

* Minor differences to align with internal version of rib-base

* Extended WorkerBinder functionality to allow for binding a worker to a presenter's lifecycle

* Minor differences & new tests to align with internal version of rib-base
2021-02-23 12:47:26 -08:00
SeungHun Choe 94d8293316 Fix gradle sync and compilation error on Android Studio 3.4 2019-05-24 10:08:25 +09:00
Jorge Coca d5e1768f78 Fixed typo on POM artifact id for rib-debug-utils 2018-04-25 09:01:45 -07:00
Brian Attwell c27c6bcae6 add gradle-mvn-push to desired modules 2017-11-04 09:00:32 -07:00
Brian Attwell cb0c937ce8 Setup gradle.properties files for maven central 2017-11-01 17:44:20 -07:00
Brian Attwell e76fe04ebb router-navigator, intellij-plugin
* Add comment explaining why lifecycled presenters exist
* Fix package name for rib debug utils
* Rename rib-assert -> rib-test-utils
* Delete orphaned files
* Refactor router-navigator into its own module. Fix some gradle dependencies
* Update the rib intellij template readme
* Include prebuilt plugin.jar
* Include link to plugin.jar in readme
* Add link to plugin inside tutorial1 readme
* Add license
2017-10-17 10:53:17 -07:00
Brian Attwell e00528e910 Move debut utils into seperate module. may delete them later 2017-10-17 10:53:16 -07:00