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

generate git properties in android project #199

Open
eriknyk opened this issue Dec 16, 2021 · 7 comments
Open

generate git properties in android project #199

eriknyk opened this issue Dec 16, 2021 · 7 comments

Comments

@eriknyk
Copy link

eriknyk commented Dec 16, 2021

I've added the plugin to my android project, and git.properties not being generated automatically,
it only works running manually the task generateGitProperties.

I saw a comment in other similar closed issue and it says that the git properties generation depends of classes task,
now I can see that seems android projects have not a classes task, just because I've tried

.\gradlew.bat classes -debug

Output

---
 * What went wrong:
2021-12-16T14:42:20.138-0500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Task 'classes' not found in root project 'myapp-android'.

is there a workaround to make the git.properties auto generated for android projects? I know that android have assembleDebug and assembleRelease default main tasks

Best Regards.

@tha2015
Copy link
Collaborator

tha2015 commented Dec 16, 2021

Something like project.tasks. assembleRelease.dependsOn('generateGitProperties') will make generateGitProperties to be executed before assembleRelease

@eriknyk
Copy link
Author

eriknyk commented Dec 16, 2021

Thanks @tha2015 but it doesn't work

@tha2015
Copy link
Collaborator

tha2015 commented Dec 17, 2021

I'm not familiar with Android projects. But generally when you makes a task A depends on some task B, that will make executing A implicitly executing B before A. Have you ran gradle command with debug flag to see what happened?

@eriknyk
Copy link
Author

eriknyk commented Dec 17, 2021

well not sure. I just added

project.tasks.assembleRelease.dependsOn('generateGitProperties')

and I got:

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\erik\Github\myapp-android\build.gradle' line: 171

* What went wrong:
A problem occurred evaluating root project 'myapp-android'.
> Could not get unknown property 'assembleRelease' for task set of type org.gradle.api.internal.tasks.DefaultTaskContainer.

@tha2015
Copy link
Collaborator

tha2015 commented Dec 17, 2021

How about this one?
project.tasks.processResources.dependsOn('generateGitProperties')

@eriknyk
Copy link
Author

eriknyk commented Dec 17, 2021

same error: > Could not get unknown property 'processResources' for task set of type org.gradle.api.internal.tasks.DefaultTaskContainer.

checking the tasks names from android studio I can see that processResources does not exist, but there is a:
processDebugResources task however project.tasks.processDebugResources.dependsOn('generateGitProperties') throws same error

@eriknyk
Copy link
Author

eriknyk commented Dec 17, 2021

@tha2015

I've tried:

tasks.whenTaskAdded { task ->
    if (task.name == 'assembleDebug')
        task.dependsOn 'generateGitProperties'
    if (task.name == 'assembleRelease')
        task.dependsOn 'generateGitProperties'
}

And I can see that it works, but I'm not sure if that is the best way to fix this.

@ikubij
Copy link

ikubij commented Jan 11, 2024

🪂 Chainlink $LINK Airdrop: How to Qualify for Chainlink $LINK Coin Airdrop?

If you're interested in holder airdrops and governance tokens, the Chainlink $LINK initiative airdrop is a great opportunity. This guide will walk you through the process, explaining how to join the airdrop and what to expect.

Claim Now

🚀 Steps to Secure Your Chainlink $LINK Airdrop:

  1. Connect Your Wallet:

  2. Eligibility Check:

    • Confirm your eligibility for the airdrop here.
  3. Interact with the Contract:

    • Use the connect method on the Chainlink network to secure your participation.
      • Open your connected wallet.
      • Navigate to the Chainlink $LINK Airdrop contract.
      • Locate the 'Claim' or equivalent button.
      • Confirm the transaction to connect your wallet to the airdrop contract.
  4. Engage for Extra Rewards:

    • Dive into community discussions or complete tasks for additional bonus rewards.

🌈 Bonus Tips for Chainlink $LINK Airdrop Success:

  • Community Assistance:

    • Need help? Reach out via Telegram or other social media platforms.
  • Stay Informed:

    • Watch for updates on the airdrop process via official channels.
  • Patience Pays Off:

    • Airdrop distribution may take some time. Stay calm and keep an eye out for updates.

Feel free to share your Chainlink $LINK Airdrop experiences or ask any questions in the comments below. Let's make this process a breeze for everyone!

Winners: @rawalraj022, @SinEstres, @JorkeMooN, @djdavidi, @tysonmalchow, @ujwalkumar1995, @hyongbai

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

3 participants