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

Consolidate both Gradle projects into one #198

Closed
wants to merge 1 commit into from
Closed

Consolidate both Gradle projects into one #198

wants to merge 1 commit into from

Conversation

SalvatoreT
Copy link
Contributor

Combine the "example" projects into the main project. I needed to move
the main library into it's own module so the other libraries could
exist. This allows a developer to open this project in IntelliJ and
build all of the projects easily.

There's still more clean-up to do such as consolidating the Kotlin
versions to one top level declaration, but I'm trying to make the
minimal amount of changes to get this to work.

Closes #153
Closes #152

@SalvatoreT
Copy link
Contributor Author

Ugh. I messed up the rebase because I forgot the main branch was called develop. 🤦

Combine the "example" projects into the main project. I needed to move
the main library into it's own module so the other libraries could
exist. This allows a developer to open this project in IntelliJ and
build all of the projects easily.

There's still more clean-up to do such as consolidating the Kotlin
versions to one top level declaration, but I'm trying to make the
minimal amount of changes to get this to work.

Closes #153
Closes #152
@SalvatoreT
Copy link
Contributor Author

Hey @Nashatyrev and @ajsutton, do y'all mind giving this a 👀 when you get the chance? If it's not something y'all want, please let me know that too, and I'll close the PR.

@Nashatyrev
Copy link
Collaborator

Hey @SalvatoreT

Sorry for such long ignorance!

I think this is generally a good refactoring

Though, I tried to build on my box and got the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':examples:android-chatter:compileReleaseKotlin'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/home/ubuntu/jvm-libp2p-slvatore/local.properties'.

Is it an option to skip :examples:android-chatter when android SDK is missing?

@SalvatoreT
Copy link
Contributor Author

If you comment out that project from the settings.gradle, it should stop being a problem.

diff --git a/settings.gradle b/settings.gradle
index 178bb1e..b1227c7 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -2,6 +2,6 @@ include ':jvm-libp2p-minimal'
 include ':examples:pinger'
 include ':examples:chatter'
 include ':examples:cli-chatter'
-include ':examples:android-chatter'
+// include ':examples:android-chatter'
 
 rootProject.name = 'jvm-libp2p-minimal'

I'm not sure off the top of my head of another clean solution.

@Nashatyrev
Copy link
Collaborator

If you comment out that project from the settings.gradle, it should stop being a problem.

Tried to comment his line but the build still fails for another reason
I think the project should be able to build 'out of the box' without any optional dependencies.
If you were able to modify the build this way (with either commenting android specific stuff or more gracefully with checking android SDK availability) I would finally merge this PR

@SalvatoreT
Copy link
Contributor Author

What was the other reason it failed?

How do you run the examples in this project today?

@SalvatoreT SalvatoreT closed this Feb 21, 2022
@SalvatoreT SalvatoreT deleted the salvatoret/consolidate-gradle-files branch February 21, 2022 02:08
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

Successfully merging this pull request may close these issues.

bug for each kind of this program except for 0.4.1,none of the project can be run on WIN10
3 participants