plugins { id("org.gradle.cpp-library") } library { /** * Gradle stipulates that the source directory is: $project/src/main/cpp/, * specifies the `.cpp` source file directory according to the project. * */ source.from( "../core", "../widgets" ) /** * Gradle conventions the header file directory is: $project/src/main/headers/, * specify the `.h` header file directory according to the project. */ privateHeaders.from( "../core_include", "../widgets_include" ) /** * Gradle only exports shared libraries(dynamic libraries) by default, * adds support for static libraries. * */ linkage.add(Linkage.STATIC) } /** * Compile tasks for custom release type dynamic and static libraries * */ tasks.register("produce") { dependsOn( "assembleReleaseShared", "assembleReleaseStatic" ) }