Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Adds agora api to shaded#37

Merged
samdowd merged 2 commits intokinecosystem:masterfrom
fangliml:add_agora_api_to_shaded
Jan 19, 2022
Merged

Adds agora api to shaded#37
samdowd merged 2 commits intokinecosystem:masterfrom
fangliml:add_agora_api_to_shaded

Conversation

@fangliml
Copy link
Contributor

This will fix base-shaded sdk, I've already tested this and it should fix the issues we've seen

@samdowd
Copy link
Contributor

samdowd commented Jan 19, 2022

Tried this in my environment and it's crashing. java.lang.NoClassDefFoundError for slf4j. If I add slf4j manually, it gives me java.lang.NoClassDefFoundError: Failed resolution of: Lnet/i2p/crypto/eddsa/spec/EdDSANamedCurveTable.

When I swap the normal SDK for the shaded jar in a project, the project will build successfully but crash on run the first time it uses the SDK. Did you test running as well? If so, can you provide the relevant grade configuration? I don't think I'm doing anything weird that would cause this not to work on my machine, but maybe I'm missing something.

@fangliml
Copy link
Contributor Author

Oh, since we are using the jar itself for testing we are missing the transitive dependencies. So probably you'll need to add:

    implementation 'net.i2p.crypto:eddsa:0.3.0'
    implementation 'io.perfmark:perfmark-api:0.23.0'

those are a couple I added manually just for the test, they should be pulled in theory after the release

@fangliml
Copy link
Contributor Author

this are the dependencies that are going to be added after publishing:

  <dependencies>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib-jdk7</artifactId>
      <version>1.4.32</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp</artifactId>
      <version>3.12.12</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>net.i2p.crypto</groupId>
      <artifactId>eddsa</artifactId>
      <version>0.3.0</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.25</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.github.joshjdevl.libsodiumjni</groupId>
      <artifactId>libsodium-jni</artifactId>
      <version>2.0.1</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>20190722</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>

So I think just adding implementation 'net.i2p.crypto:eddsa:0.3.0' should do the trick for the test

@samdowd
Copy link
Contributor

samdowd commented Jan 19, 2022

Makes sense. Working for me now.

@samdowd samdowd merged commit 1440a51 into kinecosystem:master Jan 19, 2022
@jackromo888
Copy link

#37

jackromo888 added a commit to jackromo888/kin-android that referenced this pull request Sep 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants