plugins { alias(libs.plugins.android.library) alias(libs.plugins.kotlin.android) } //preBuild { // doLast { // try { // def rootProjectName = rootProject.name.replace(" ", "_") // def projectName = project.name.replace(" ", "_") // def iml_path0 = "$rootProject.rootDir\\.idea\\modules\\" + projectName + "\\" + rootProjectName + "." + projectName + ".main.iml" // def iml_path1 = "$rootProject.rootDir\\.idea\\modules\\" + projectName + "\\" + rootProjectName + "." + projectName + ".iml" // def imlFileList = [file(iml_path0), file(iml_path1)] // for (imlFile in imlFileList) { // if (imlFile.exists()) { // def parsedXml = (new XmlParser()).parse(imlFile) // def jdkNode = parsedXml.component[1].orderEntry.find { it.'@type' == 'jdk' } // def sdkString = jdkNode.'@jdkName' // parsedXml.component[1].remove(jdkNode) // new Node(parsedXml.component[1], 'orderEntry', ['type': 'jdk', 'jdkName': sdkString, 'jdkType': 'Android SDK']) // groovy.xml.XmlUtil.serialize(parsedXml, new FileOutputStream(imlFile)) // } // } // } catch (FileNotFoundException e) { // e.printStackTrace() // } // } //} android { namespace = "com.android.wifitrackerlib" compileSdk 34 compileSdkVersion 34 defaultConfig { minSdk 31 targetSdk 34 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } sourceSets { main { java.srcDirs = ['src'] manifest.srcFile 'AndroidManifest.xml' res.srcDirs = ['res'] } } lint { abortOnError false } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } buildToolsVersion '34.0.0' tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } } dependencies { compileOnly files('../libs/framework.jar') compileOnly files('../libs/wifi_aconfig_flags_lib.jar') implementation libs.androidx.annotation.annotation implementation libs.androidx.core.core implementation libs.lifecycle.runtime // implementation files('../libs/WifiTrackerLibRes.jar') implementation project(':SettingsLib:HelpUtils') }