Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Adriannatsu
    @Adriannatsu
    Hello
    I implement the library into my Android Studio, but why I can't access the functions inside?
    Ugljesa Jovanovic
    @ionspin
    Hey Adriannatsu, I'm at work at the moment so I'll be able to help you out in detail in the evening, but a quick tip, you should put the bignum dependancy inside your sharedcode project build.gradle, not the android one where you currently have it
    Adriannatsu
    @Adriannatsu
    yeah I had put the dependencies in the sharedcode gradle also
    Ugljesa Jovanovic
    @ionspin
    Hey @Adriannatsu could you share your common project build.gradle as well? Maybe I can spot something amiss there, but I suspect it's Android Studio not supporting multiplatform projects correctly that is giving you trouble
    Adriannatsu
    @Adriannatsu
    @ionspin but yeah I implement in the common project build.gradle to but I still can't access the library ...
    Adriannatsu
    @Adriannatsu
    apply plugin: 'kotlin-multiplatform'
    
    kotlin {
        targets {
        final def iOSTarget = System.getenv('SDK_NAME')?.startsWith("iphoneos") \
                              ? presets.iosArm64 : presets.iosX64
    
        fromPreset(iOSTarget, 'iOS') {
            binaries {
                framework('SharedCode')
            }
        }
    
        fromPreset(presets.jvm, 'android')
    }
    
    sourceSets {
        commonMain.dependencies {
            api 'org.jetbrains.kotlin:kotlin-stdlib-common'
            implementation("com.ionspin.kotlin:bignum:0.0.7")
    
        }
    
        androidMain.dependencies {
            api 'org.jetbrains.kotlin:kotlin-stdlib'
        }
    }
    }
    
    // workaround for https://youtrack.jetbrains.com/issue/KT-27170
    configurations {
        compileClasspath
    }
    Ugljesa Jovanovic
    @ionspin
    I see, the problem is I haven't published the iOS artifact yet, I started working on that yesterday, I'll ping you when it's ready so you can try again. Sorry for the confusion.
    @Adriannatsu hopefully I'll have it published by tommorow end of day
    Ugljesa Jovanovic
    @ionspin
    Hey @Adriannatsu I have released iOS and macos artifacts to maven central. They are under version 0.0.8, give it a try and see if it resolves your issues
    Adriannatsu
    @Adriannatsu
    @ionspin Thanks for your effort and I update the library into 0.0.8 but it still have the same problem which I can't access the library which I can't even call the BigInteger in my common.
    beckettsimmons
    @beckettsimmons
    Hey, I wanted to use this project but I'm running the latest version of Kotlin (1.3.72). Would it be possible to get an update for the latest version?
    Ugljesa Jovanovic
    @ionspin
    Hi @beckettsimmons, the current snapshots (master) is actually targeting 1.4-M2, unfortunately I didn't do a full release and blew past 1.3.72. Let me see if I can pack up a 1.3.72 snapshot release tomorrow, i's almost midnight here.
    beckettsimmons
    @beckettsimmons
    @ionspin Oh ha, yeah, things are going so fast these days with Kotlin. Yes, that would be great if you could. Thanks!
    Ugljesa Jovanovic
    @ionspin
    Hey @beckettsimmons I released a snapshot version 0.1.6-1.3.72-SNAPSHOT thay should work for you
    Just keep in mind that it's in sonatype snapshot repository
    So you should use '''repositories {
    maven {
    url = uri("https://oss.sonatype.org/content/repositories/snapshots")
    }
    }
    implementation("com.ionspin.kotlin:bignum:0.1.6-1.3.72-SNAPSHOT ")'''
    Next stable release is going out when Kotlin 1.4 stable is out
    beckettsimmons
    @beckettsimmons
    Sweet, that's working perfectly. Thanks a lot!
    Omar Alejandro Mainegra Sarduy
    @omainegra
    Hi everyone, I'm facing some issues in JS, for example, this fails:
    assertEquals(-1, BigInteger.fromInt(-1).intValue())
    1 reply
    Ugljesa Jovanovic
    @ionspin
    Hey @omainegra , thanks for reporting the issue, nice catch, theres a bug in intValue (and all other signed number primitive conversions) they are missing sign of the number
    I'll release the fix in the next stable version which comes out when Kotlin 1.4 gets release, or you can get it in snapshots, which will be available in a couple of hours, but they are built for Kotlin 1.4.0-rc