| apply plugin: 'com.android.tools.java-library' |
| apply plugin: 'com.android.tools.kotlin' |
| apply plugin: 'com.android.tools.publish' |
| apply plugin: 'sdk-java-lib' |
| |
| group = 'com.android.tools.lint' |
| version = rootProject.ext.baseVersion |
| |
| compileKotlin { |
| kotlinOptions { |
| jvmTarget = "1.8" |
| } |
| } |
| |
| dependencies { |
| api project(':base:lint-checks') |
| implementation libs.guava |
| implementation project(':base:uast') |
| implementation project(':base:sdk-common') |
| implementation project(':base:sdklib') |
| implementation project(':base:common') |
| implementation project(':base:kotlin-compiler') |
| implementation project(':base:intellij-core') |
| implementation project(':base:manifest-merger') |
| implementation project(':base:layoutlib-api') |
| implementation project(':analytics-library:shared') |
| implementation project(':analytics-library:protos') |
| implementation project(':analytics-library:tracker') |
| |
| implementation libs.kotlin_reflect |
| implementation libs.kotlin_stdlib |
| } |
| |
| sourceSets { |
| main.resources.srcDir 'src/main/java' |
| test.resources.srcDir 'src/test/java' |
| } |
| |
| test { |
| maxParallelForks = Runtime.runtime.availableProcessors() / 2 |
| } |
| |
| task lintStartScripts(type: CreateStartScripts) { |
| classpath = project.getTasks().getAt(JavaPlugin.JAR_TASK_NAME).getOutputs().getFiles().plus( |
| project.getConfigurations().getByName("runtimeClasspath")) |
| outputDir new File(project.getBuildDir(), "scripts") |
| |
| description "Creates OS specific scripts to start the lint CLI" |
| mainClassName = 'com.android.tools.lint.Main' |
| applicationName = 'lint' |
| defaultJvmOpts = ["-Xmx1024m", "-Dcom.android.tools.lint.bindir=MY_APP_HOME"] |
| |
| doLast { |
| unixScript.text = unixScript.text.replace('MY_APP_HOME', '\$APP_HOME') |
| windowsScript.text = windowsScript.text.replace('MY_APP_HOME', '%~dp0\\..') |
| } |
| } |
| |
| |
| sdk { |
| common(mac, linux) { |
| item(new File(lintStartScripts.outputDir, "lint")) { |
| into "bin" |
| notice null |
| builtBy 'lintStartScripts' |
| } |
| } |
| windows { |
| item(new File(lintStartScripts.outputDir, "lint.bat")) { |
| into "bin" |
| notice null |
| builtBy 'lintStartScripts' |
| } |
| } |
| } |
| |
| // configure the manifest of the sdkJar task. |
| sdkJar.manifest.attributes("Main-Class": "com.android.tools.lint.Main") |
| |
| project.ext.pomName = 'Android Lint Tool' |
| project.ext.pomDesc = 'Lint tools. Both a Command line tool and a library to add lint features to other tools' |
| |
| publishing { |
| publications { |
| withType(MavenPublication) { |
| artifactId = 'lint' |
| } |
| } |
| } |