1import org.robolectric.gradle.DeployedRoboJavaModulePlugin 2import org.robolectric.gradle.RoboJavaModulePlugin 3 4apply plugin: RoboJavaModulePlugin 5apply plugin: DeployedRoboJavaModulePlugin 6 7apply plugin: ShadowsPlugin 8 9shadows { 10 packageName "org.robolectric" 11 sdkCheckMode "ERROR" 12} 13 14configurations { 15 sqlite4java 16} 17 18def sqlite4javaVersion = libs.versions.sqlite4java.get() 19 20tasks.register('copySqliteNatives', Copy) { 21 from project.configurations.sqlite4java { 22 include '**/*.dll' 23 include '**/*.so' 24 include '**/*.dylib' 25 rename { String filename -> 26 def filenameMatch = filename =~ /^([^\-]+)-(.+)-${sqlite4javaVersion}\.(.+)/ 27 if (filenameMatch) { 28 def platformFilename = filenameMatch[0][1] 29 def platformFolder = filenameMatch[0][2] 30 def platformExtension = filenameMatch[0][3] 31 32 "${platformFolder}/${platformFilename}.${platformExtension}" 33 } 34 } 35 } 36 into project.file("$buildDir/resources/main/sqlite4java") 37} 38 39jar { 40 dependsOn copySqliteNatives 41} 42 43javadoc { 44 dependsOn copySqliteNatives 45} 46 47dependencies { 48 api project(":annotations") 49 api project(":nativeruntime") 50 api project(":resources") 51 api project(":pluginapi") 52 api project(":sandbox") 53 api project(":shadowapi") 54 api project(":shadows:versioning") 55 api project(":utils") 56 api project(":utils:reflector") 57 58 api "androidx.test:monitor:$axtMonitorVersion@aar" 59 60 implementation libs.error.prone.annotations 61 compileOnly libs.findbugs.jsr305 62 api libs.sqlite4java 63 compileOnly(AndroidSdk.MAX_SDK.coordinates) 64 api libs.icu4j 65 api libs.androidx.annotation 66 api libs.auto.value.annotations 67 annotationProcessor libs.auto.value 68 69 sqlite4java libs.bundles.sqlite4java.native 70} 71