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

Adding koma to android project after repo shutdown. #111

Open
Karcsii opened this issue Apr 16, 2023 · 1 comment
Open

Adding koma to android project after repo shutdown. #111

Karcsii opened this issue Apr 16, 2023 · 1 comment

Comments

@Karcsii
Copy link

Karcsii commented Apr 16, 2023

I need an Android library for calculating matrix exponentials and products. I tied using koma but could not add it to my build gradle. I have tried both the fixes in #110 and #108 but no luck. Here is my project's build.gradle:

buildscript {
    ext.kotlin_version = '1.3.10'
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://plugins.gradle.org/m2/") }
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
        classpath "com.android.tools.build:gradle:7.0.4"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

My module's build.gradle:

plugins {
    id 'com.android.application'
    id "io.github.0ffz.github-packages"
}

apply plugin: 'kotlin-android'

android {
    compileSdk 33

    defaultConfig {
        applicationId "com.example.hellokotlin"
        minSdk 28
        targetSdk 33
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.6.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation files('libs\\core.jar')
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    implementation 'androidx.core:core-ktx:1.5.0'
    implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.0'
    implementation "com.kyonifer:koma-core-ejml:0.12.1"
    implementation "com.kyonifer:koma-core-api-jvm:0.12.1"

}

and my settings.gradle:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { githubPackage("kyonifer")(this) }
        maven { url = uri("https://jitpack.io")  }
    }
}
rootProject.name = "hellokotlin"
include ':app'

Here's the error I am getting with this config:
image
I have tried a bunch of other things too, but they threw different errors, hopefully someone can point me in the right direction.

@vietnt-uet
Copy link

@Karcsii Did you make it run on Android, I face the similar issue, it would be great if you can share your approach to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants