0

how to write a gradle build file for c code to create a shared object library (.so) file ?
For creating C executables i can use the below , please guide for creating .so files

apply plugin : 'c' 

model { 
    components {
        main(NativeExecutableSpec)   
    }
}
Vampire
  • 35,631
  • 4
  • 76
  • 102

1 Answers1

0

Use a NativeLibrarySpec instead of a NativeExecutableSpec as described at https://docs.gradle.org/current/userguide/native_software.html#sec:building_a_library

Vampire
  • 35,631
  • 4
  • 76
  • 102