Skip to content

Conditional Dependency Script Fix for macOS Apple Silicon #14

@zeze1004

Description

@zeze1004

This issue is to report and propose a fix for an encountered problem related to io.netty.resolver.dns.DnsServerAddressStreamProviders on macOS, specifically affecting Apple Silicon (ARM64) users.

image

I propose a script statement that applies only to macOS, without affecting users of other OSs.

def isAppleSilicon() {
	return System.getProperty("os.name") == "Mac OS X" && System.getProperty("os.arch") == "aarch64"
}

dependencies {
	implementation ...
	if (isAppleSilicon()) { runtimeOnly('io.netty:netty-resolver-dns-native-macos:4.1.94.Final:osx-aarch_64') }
        ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions