nativelib.cc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*!A gradle plugin that integrates xmake seamlessly
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. *
  15. * Copyright (C) 2020-present, TBOOX Open Source Group.
  16. *
  17. * @author ruki
  18. * @file nativelib.c
  19. *
  20. */
  21. /* //////////////////////////////////////////////////////////////////////////////////////
  22. * includes
  23. */
  24. #include <jni.h>
  25. #include <string.h>
  26. #include <android/log.h>
  27. /* //////////////////////////////////////////////////////////////////////////////////////
  28. * private implementation
  29. */
  30. /* //////////////////////////////////////////////////////////////////////////////////////
  31. * interfaces
  32. */
  33. extern "C"
  34. {
  35. JNIEXPORT jstring Java_org_tboox_xmake_nativelib_Test_getNativeInfo(JNIEnv* env, jclass jthis, jobject context)
  36. {
  37. return env->NewStringUTF("hello xmake!");
  38. }
  39. }