Skip to content

Added kotlin classes to AAR#24884

Merged
asmorkalov merged 2 commits intoopencv:4.xfrom
alexlyulkov:al/aar-add-kotlin
Feb 22, 2024
Merged

Added kotlin classes to AAR#24884
asmorkalov merged 2 commits intoopencv:4.xfrom
alexlyulkov:al/aar-add-kotlin

Conversation

@alexlyulkov
Copy link
Copy Markdown
Contributor

@alexlyulkov alexlyulkov commented Jan 18, 2024

Added Kotlin classes to AAR

The resulting maven repo doesn't have kotlin-plugin dependency, and it works fine out of the box: Android Kotlin projects already have kotlin-plugin dependency, Android Java projects ignore kotlin classes.

Details on KGP versions: https://kotlinlang.org/docs/gradle-configure-project.html#apply-the-plugin

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov
Copy link
Copy Markdown
Contributor

Build file '/home/ci/build/build_java_shared/AndroidProject/build.gradle' line: 4

* What went wrong:
Plugin [id: 'org.jetbrains.kotlin.android', version: '1.5.20', apply: false] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.android:org.jetbrains.kotlin.android.gradle.plugin:1.5.20')
  Searched in the following repositories:
    Google
    MavenRepo
    Gradle Central Plugin Repository

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

Looks like we need to tune something on CI or use another Kotlin version.

@asmorkalov asmorkalov added this to the 4.10.0 milestone Jan 18, 2024
@asmorkalov asmorkalov force-pushed the al/aar-add-kotlin branch 2 times, most recently from b730e64 to a9a551b Compare January 29, 2024 16:13
@asmorkalov asmorkalov force-pushed the al/aar-add-kotlin branch 2 times, most recently from 8af46e4 to ae107ca Compare February 21, 2024 16:34
@asmorkalov asmorkalov self-assigned this Feb 22, 2024
@asmorkalov asmorkalov merged commit 915e677 into opencv:4.x Feb 22, 2024
@asmorkalov asmorkalov mentioned this pull request Feb 26, 2024
klatism pushed a commit to klatism/opencv that referenced this pull request May 17, 2024
Added kotlin classes to AAR opencv#24884 

The resulting maven repo doesn't have kotlin-plugin dependency, and it works fine out of the box: Android Kotlin projects already have kotlin-plugin dependency, Android Java projects ignore kotlin classes.

Details on KGP versions: https://kotlinlang.org/docs/gradle-configure-project.html#apply-the-plugin

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake

Co-authored-by: Alexander Lyulkov <alexander.lyulkov@opencv.ai>
Co-authored-by: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants