You can open this sample inside an IDE using the IntelliJ native importer, Eclipse Buildship, or Nokee’s Xcode IDE plugin

This sample shows how a native application implemented in Objective-C can be built with Gradle. The application has no dependencies, and the build has a minimal configuration.

build.gradle
plugins {
	id 'dev.nokee.objective-c-application'
	id 'dev.nokee.xcode-ide'
}

import dev.nokee.platform.nativebase.ExecutableBinary

application.variants.configureEach {
	binaries.configureEach(ExecutableBinary) {
		linkTask.configure {
			linkerArgs.add('-lobjc')
		}
	}
}
build.gradle.kts
plugins {
	id("dev.nokee.objective-c-application")
	id("dev.nokee.xcode-ide")
}

import dev.nokee.platform.nativebase.ExecutableBinary

application.variants.configureEach {
	binaries.configureEach(ExecutableBinary::class.java) {
		linkTask.configure {
			linkerArgs.add("-lobjc")
		}
	}
}

To build the application:

$ ./gradlew assemble

BUILD SUCCESSFUL
2 actionable tasks: 2 executed

The application produced inside ./build/exes/main directory:

$ ./build/exes/main/objective-c-application
Bonjour, Alice!

For more information, see Objective-C Application Plugin reference chapter and Building Native Projects chapter.