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

refactor(core): only apply publish and codecov if they exist #232

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

andreasgangso
Copy link
Contributor

Minor non-breaking change that allows a fork to easily substitute the :core module with their own implementation.
Useful e.g. when contributors are waiting for PRs to be merged.

Otherwise projects using forks would need to make empty files in their own projects which is ugly.

@sonarcloud
Copy link

sonarcloud bot commented Jun 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@andreasgangso
Copy link
Contributor Author

andreasgangso commented Jun 7, 2023

For reference if anyone needs to substitute core with their own fork.

settings.gradle
include ':app', ':rudder-sdk-android-core'
project(':rudder-sdk-android-core').projectDir = new File('../external_projects/rudder-sdk-android/core')
root build.gradle
configure([project(":rudder-sdk-android-core")]) {
    ext {
        VERSION_NAME = "1.8.1"
    }
}

allprojects {
    configurations.all {
        resolutionStrategy.dependencySubstitution.all { DependencySubstitution dependency ->
            if (dependency.requested instanceof ModuleComponentSelector && dependency.requested.group == 'com.rudderstack.android.sdk') {
                def targetProject = findProject(':rudder-sdk-android-core')
                if (targetProject != null) {
                    logger.info('Substituting rudder-sdk-android-core with local :rudder-sdk-android-core.')
                    dependency.useTarget targetProject
                    logger.info('Successfully substituted rudder-sdk-android-core with local :rudder-sdk-android-core.')
                } else {
                    logger.error('Couldnt find local project(:rudder-sdk-android-core).')
                }
            }
        }
    }
}

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.

1 participant