暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.gradle 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. apply plugin: 'com.android.library'
  2. apply from: '../shared/keepUnitySymbols.gradle'
  3. dependencies {
  4. implementation fileTree(dir: 'libs', include: ['*.jar'])
  5. // Android Resolver Dependencies Start
  6. implementation 'com.google.android.gms:play-services-ads:22.6.0' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7
  7. implementation 'com.google.android.ump:user-messaging-platform:2.1.0' // Assets/GoogleMobileAds/Editor/GoogleUmpDependencies.xml:7
  8. // Android Resolver Dependencies End
  9. implementation(name: 'googlemobileads-unity', ext:'aar')
  10. implementation project(':unityLibrary:GoogleMobileAdsPlugin.androidlib')
  11. implementation 'androidx.appcompat:appcompat:1.6.1'
  12. implementation 'androidx.core:core:1.9.0'
  13. implementation 'androidx.games:games-activity:3.0.3'
  14. implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
  15. implementation 'androidx.games:games-frame-pacing:1.10.0'
  16. }
  17. // Android Resolver Exclusions Start
  18. android {
  19. packaging {
  20. exclude ('/lib/armeabi/*' + '*')
  21. exclude ('/lib/mips/*' + '*')
  22. exclude ('/lib/mips64/*' + '*')
  23. exclude ('/lib/x86/*' + '*')
  24. exclude ('/lib/x86_64/*' + '*')
  25. }
  26. }
  27. // Android Resolver Exclusions End
  28. android {
  29. namespace "com.unity3d.player"
  30. ndkPath "D:/6000.0.9f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK"
  31. ndkVersion "23.1.7779620"
  32. compileSdk 34
  33. buildToolsVersion = "34.0.0"
  34. compileOptions {
  35. sourceCompatibility JavaVersion.VERSION_17
  36. targetCompatibility JavaVersion.VERSION_17
  37. }
  38. defaultConfig {
  39. minSdk 23
  40. targetSdk 34
  41. ndk {
  42. abiFilters 'armeabi-v7a', 'arm64-v8a'
  43. debugSymbolLevel 'full'
  44. }
  45. versionCode 2
  46. versionName '1.0'
  47. consumerProguardFiles 'proguard-unity.txt'
  48. externalNativeBuild {
  49. cmake {
  50. arguments "-DANDROID_STL=c++_shared"
  51. }
  52. }
  53. }
  54. lint {
  55. abortOnError false
  56. }
  57. androidResources {
  58. noCompress = ['.unity3d', '.ress', '.resource', '.obb', '.bundle', '.unityexp'] + unityStreamingAssets.tokenize(', ')
  59. ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
  60. }
  61. packaging {
  62. jniLibs {
  63. useLegacyPackaging true
  64. }
  65. }
  66. }
  67. android.externalNativeBuild {
  68. cmake {
  69. version "3.22.1"
  70. // Workaround for CMake long path issue on Windows, place CMake intermediate files next to Unity project
  71. buildStagingDirectory "${unityProjectPath}/.utmp"
  72. path "src/main/cpp/CMakeLists.txt"
  73. }
  74. }
  75. android.buildFeatures {
  76. prefab true
  77. }