diff options
Diffstat (limited to 'platform/android/gradle')
-rw-r--r-- | platform/android/gradle/android-nitpick.gradle | 66 | ||||
-rw-r--r-- | platform/android/gradle/artifact-settings.gradle | 21 | ||||
-rw-r--r-- | platform/android/gradle/dependencies.gradle | 90 | ||||
-rw-r--r-- | platform/android/gradle/gradle-bintray.gradle | 117 | ||||
-rw-r--r-- | platform/android/gradle/gradle-checkstyle.gradle | 26 | ||||
-rw-r--r-- | platform/android/gradle/gradle-config.gradle | 23 | ||||
-rw-r--r-- | platform/android/gradle/gradle-dependencies-graph.gradle | 29 | ||||
-rw-r--r-- | platform/android/gradle/gradle-javadoc.gradle | 18 | ||||
-rw-r--r-- | platform/android/gradle/gradle-lint.gradle | 30 | ||||
-rw-r--r-- | platform/android/gradle/gradle-make.gradle | 18 | ||||
-rw-r--r-- | platform/android/gradle/gradle-update-vendor-modules.gradle | 8 | ||||
-rw-r--r-- | platform/android/gradle/jacoco-report.gradle | 33 | ||||
-rw-r--r-- | platform/android/gradle/ktlint.gradle | 27 | ||||
-rw-r--r-- | platform/android/gradle/native-build.gradle | 70 | ||||
-rw-r--r-- | platform/android/gradle/wrapper/gradle-wrapper.jar | bin | 54227 -> 0 bytes | |||
-rw-r--r-- | platform/android/gradle/wrapper/gradle-wrapper.properties | 6 |
16 files changed, 0 insertions, 582 deletions
diff --git a/platform/android/gradle/android-nitpick.gradle b/platform/android/gradle/android-nitpick.gradle deleted file mode 100644 index 6db3519678..0000000000 --- a/platform/android/gradle/android-nitpick.gradle +++ /dev/null @@ -1,66 +0,0 @@ -apply from: "${rootDir}/gradle/dependencies.gradle" - -def MAPBOX_JAVA_DIR = 'mapbox-java' -def MAPBOX_JAVA_TAG_PREFIX = 'v' - -def MAPBOX_TELEMETRY_DIR = 'mapbox-events-android' -def MAPBOX_TELEMETRY_TAG_PREFIX = 'telem-' -def MAPBOX_CORE_TAG_PREFIX = '-core-' - -def MAPBOX_GESTURES_DIR = 'mapbox-gestures-android' -def MAPBOX_GESTURES_TAG_PREFIX = 'v' - -task androidNitpick { - doLast { - println "Running android nitpick script" - - println "Verify vendor submodule pins" - verifyVendorSubmodulePin(MAPBOX_JAVA_DIR, MAPBOX_JAVA_TAG_PREFIX, versions.mapboxServices) - verifyVendorSubmodulePin(MAPBOX_TELEMETRY_DIR, MAPBOX_TELEMETRY_TAG_PREFIX, - versions.mapboxTelemetry + MAPBOX_CORE_TAG_PREFIX + versions.mapboxCore) - verifyVendorSubmodulePin(MAPBOX_GESTURES_DIR, MAPBOX_GESTURES_TAG_PREFIX, versions.mapboxGestures) - - verifyLicenseGeneration() - } -} - -private def verifyVendorSubmodulePin(def dir, def prefix, def version) { - println "Verify vendor submodule pin: ${dir} (${prefix + version})" - exec { - workingDir = "${rootDir}/vendor/${dir}" - commandLine "git", "fetch", "-t" - } - - def output = new ByteArrayOutputStream() - exec { - workingDir = "${rootDir}/vendor/${dir}" - commandLine "git", "rev-list", "-n", "1", "tags/${prefix + version}" - standardOutput = output - } - def expectedCommit = output.toString().trim() - output.reset() - - exec { - workingDir = "${rootDir}/vendor/${dir}" - commandLine "git", "rev-parse", "HEAD" - standardOutput = output - } - def actualCommit = output.toString().trim() - - if (actualCommit != expectedCommit) { - throw new IllegalStateException("${dir} vendor repository is not checked out on the consumed binary's tag.\n" + - "Expected commit: " + expectedCommit + "(${prefix + version} tag).\n" + - "Actual commit: " + actualCommit + ".\n" + - "If you've updated the version in the dependencies.gradle file, make sure to bump the submodule pin in the platform/android/vendor/ directory to match the release tag.\n" + - "If you've bumped the pin, make sure to verify the version tag prefix in the android-nitpick.gradle file.") - } - output.close() -} - -private def verifyLicenseGeneration() { - println "Verify license generation with git diff..." - exec { - workingDir = "${rootDir}" - commandLine "python", "scripts/validate-license.py" - } -}
\ No newline at end of file diff --git a/platform/android/gradle/artifact-settings.gradle b/platform/android/gradle/artifact-settings.gradle deleted file mode 100644 index acf29eeb84..0000000000 --- a/platform/android/gradle/artifact-settings.gradle +++ /dev/null @@ -1,21 +0,0 @@ -ext { - mapboxArtifactGroupId = 'com.mapbox.mapboxsdk' - mapboxArtifactId = 'mapbox-android-sdk' - mapboxArtifactTitle = 'Mapbox Maps SDK for Android' - mapboxArtifactDescription = 'Mapbox Maps SDK for Android' - mapboxDeveloperName = 'Mapbox' - mapboxDeveloperId = 'mapbox' - mapboxArtifactUrl = 'https://github.com/mapbox/mapbox-gl-native' - mapboxArtifactVcsUrl = 'https://github.com/mapbox/mapbox-gl-native.git' - mapboxArtifactScmUrl = 'scm:git@github.com:mapbox/mapbox-gl-native.git' - mapboxArtifactLicenseName = 'BSD' - mapboxArtifactLicenseUrl = 'https://opensource.org/licenses/BSD-2-Clause' - versionName = project.hasProperty('VERSION_NAME') ? project.property('VERSION_NAME') : System.getenv('VERSION_NAME') - - mapboxBintrayUserOrg = 'mapbox' - mapboxBintrayRepoName = 'mapbox' - mapboxBintrayPackageName = 'com.mapbox.mapboxsdk:mapbox-android-sdk' - mapboxBintrayUser = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER') - mapboxBintrayApiKey = project.hasProperty('BINTRAY_API_KEY') ? project.property('BINTRAY_API_KEY') : System.getenv('BINTRAY_API_KEY') - mapboxGpgPassphrase = project.hasProperty('GPG_PASSPHRASE') ? project.property('GPG_PASSPHRASE') : System.getenv('GPG_PASSPHRASE') -} diff --git a/platform/android/gradle/dependencies.gradle b/platform/android/gradle/dependencies.gradle deleted file mode 100644 index 31633488eb..0000000000 --- a/platform/android/gradle/dependencies.gradle +++ /dev/null @@ -1,90 +0,0 @@ -ext { - - androidVersions = [ - minSdkVersion : 14, - targetSdkVersion : 28, - compileSdkVersion: 28, - ] - - versions = [ - mapboxServices : '4.9.0', - mapboxTelemetry : '4.5.1', - mapboxCore : '1.3.0', - mapboxGestures : '0.5.1', - mapboxAccounts : '0.2.0', - supportLib : '28.0.0', - constraintLayout: '1.1.2', - uiAutomator : '2.1.3', - espresso : '3.0.2', - testRunner : '1.0.2', - leakCanary : '1.6.3', - junit : '4.12', - mockito : '3.0.0', - mockk : '1.9.3', - robolectric : '4.3', - timber : '4.7.1', - okhttp : '3.12.3', - kotlin : '1.3.41', - licenses : '0.8.5', - bintray : '1.8.4', - artifactory : '4.9.3', - androidPublish : '3.6.2', - lint : '26.4.2', - gms : '16.0.0', - soLoader : '0.6.1', - jacoco : '0.8.4', - appcenter : '1.4', - ktlint : '0.34.0', - commonsIO : '2.6' - ] - - dependenciesList = [ - mapboxJavaGeoJSON : "com.mapbox.mapboxsdk:mapbox-sdk-geojson:${versions.mapboxServices}", - mapboxAndroidTelemetry : "com.mapbox.mapboxsdk:mapbox-android-telemetry:${versions.mapboxTelemetry}", - mapboxAndroidGestures : "com.mapbox.mapboxsdk:mapbox-android-gestures:${versions.mapboxGestures}", - mapboxAndroidAccounts : "com.mapbox.mapboxsdk:mapbox-android-accounts:${versions.mapboxAccounts}", - mapboxJavaTurf : "com.mapbox.mapboxsdk:mapbox-sdk-turf:${versions.mapboxServices}", - - junit : "junit:junit:${versions.junit}", - mockito : "org.mockito:mockito-core:${versions.mockito}", - mockk : "io.mockk:mockk:${versions.mockk}", - robolectric : "org.robolectric:robolectric:${versions.robolectric}", - - testRunner : "com.android.support.test:runner:${versions.testRunner}", - testRules : "com.android.support.test:rules:${versions.testRunner}", - testEspressoCore : "com.android.support.test.espresso:espresso-core:${versions.espresso}", - testEspressoIntents : "com.android.support.test.espresso:espresso-intents:${versions.espresso}", - testEspressoContrib : "com.android.support.test.espresso:espresso-contrib:${versions.espresso}", - testUiAutomator : "com.android.support.test.uiautomator:uiautomator-v18:${versions.uiAutomator}", - appCenter : "com.microsoft.appcenter:espresso-test-extension:${versions.appcenter}", - commonsIO : "commons-io:commons-io:${versions.commonsIO}", - supportAnnotations : "com.android.support:support-annotations:${versions.supportLib}", - supportAppcompatV7 : "com.android.support:appcompat-v7:${versions.supportLib}", - supportFragmentV4 : "com.android.support:support-fragment:${versions.supportLib}", - supportUtilV4 : "com.android.support:support-core-utils:${versions.supportLib}", - supportDesign : "com.android.support:design:${versions.supportLib}", - supportRecyclerView : "com.android.support:recyclerview-v7:${versions.supportLib}", - supportConstraintLayout: "com.android.support.constraint:constraint-layout:${versions.constraintLayout}", - - gmsLocation : "com.google.android.gms:play-services-location:${versions.gms}", - timber : "com.jakewharton.timber:timber:${versions.timber}", - okhttp3 : "com.squareup.okhttp3:okhttp:${versions.okhttp}", - leakCanaryDebug : "com.squareup.leakcanary:leakcanary-android:${versions.leakCanary}", - leakCanaryRelease : "com.squareup.leakcanary:leakcanary-android-no-op:${versions.leakCanary}", - soLoader : "com.facebook.soloader:soloader:${versions.soLoader}", - - kotlinLib : "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}", - kotlinPlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}", - licensesPlugin : "com.jaredsburrows:gradle-license-plugin:${versions.licenses}", - bintrayPlugin : "com.jfrog.bintray.gradle:gradle-bintray-plugin:${versions.bintray}", - artifactoryPlugin : "org.jfrog.buildinfo:build-info-extractor-gradle:${versions.artifactory}", - androidPublishPlugin : "digital.wup:android-maven-publish:${versions.androidPublish}", - jacocoPlugin : "org.jacoco:org.jacoco.core:${versions.jacoco}", - - lint : "com.android.tools.lint:lint:${versions.lint}", - lintApi : "com.android.tools.lint:lint-api:${versions.lint}", - lintChecks : "com.android.tools.lint:lint-checks:${versions.lint}", - lintTests : "com.android.tools.lint:lint-tests:${versions.lint}", - ktlint : "com.pinterest:ktlint:${versions.ktlint}" - ] -} diff --git a/platform/android/gradle/gradle-bintray.gradle b/platform/android/gradle/gradle-bintray.gradle deleted file mode 100644 index e8ace73598..0000000000 --- a/platform/android/gradle/gradle-bintray.gradle +++ /dev/null @@ -1,117 +0,0 @@ -apply plugin: 'digital.wup.android-maven-publish' -apply plugin: 'maven-publish' -apply plugin: 'com.jfrog.bintray' -apply plugin: 'com.jfrog.artifactory' -apply from: file('../gradle/artifact-settings.gradle') - -version = project.ext.versionName -group = project.ext.mapboxArtifactGroupId - -publishing { - publications { - MapboxMapsSdkPublication(MavenPublication) { - from components.android - groupId this.group - artifactId project.ext.mapboxArtifactId - version this.version - - afterEvaluate { - artifact(androidSourcesJar) - artifact(androidJavadocsJar) - } - - pom.withXml { - final mainNode = asNode() - mainNode.appendNode('name', project.ext.mapboxArtifactTitle) - mainNode.appendNode('description', project.ext.mapboxArtifactTitle) - mainNode.appendNode('url', project.ext.mapboxArtifactUrl) - - final licenseNode = mainNode.appendNode('licenses').appendNode('license') - licenseNode.appendNode('name', project.ext.mapboxArtifactLicenseName) - licenseNode.appendNode('url', project.ext.mapboxArtifactLicenseUrl) - licenseNode.appendNode('distribution', "repo") - - final developerNode = mainNode.appendNode('developers').appendNode('developer') - developerNode.appendNode('id', project.ext.mapboxDeveloperId) - developerNode.appendNode('name', project.ext.mapboxDeveloperName) - - final scmNode = mainNode.appendNode("scm") - scmNode.appendNode("connection", project.ext.mapboxArtifactScmUrl) - scmNode.appendNode("developerConnection", project.ext.mapboxArtifactScmUrl) - scmNode.appendNode("url", project.ext.mapboxArtifactUrl) - } - } - } -} - -bintray { - user = mapboxBintrayUser - key = mapboxBintrayApiKey - publications('MapboxMapsSdkPublication') - pkg { - repo = project.ext.mapboxBintrayRepoName - name = project.ext.mapboxBintrayPackageName - userOrg = project.ext.mapboxBintrayUserOrg - licenses = [project.ext.mapboxArtifactLicenseName] - vcsUrl = project.ext.mapboxArtifactVcsUrl - publish = false - version { - name = project.ext.versionName - desc = project.ext.mapboxArtifactDescription - released = new Date() - gpg { - sign = true - passphrase = mapboxGpgPassphrase - } - mavenCentralSync { - sync = false - } - } - } -} - -artifactory { - contextUrl = 'http://oss.jfrog.org' - publish { - repository { - repoKey = 'oss-snapshot-local' - username = mapboxBintrayUser - password = mapboxBintrayApiKey - } - defaults { - publications('MapboxMapsSdkPublication') - } - } -} - -task androidJavadocs(type: Javadoc) { - source = android.sourceSets.main.java.sourceFiles - classpath = files(android.bootClasspath) - failOnError = false -} - -task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { - classifier = 'javadoc' - from androidJavadocs.destinationDir -} - -task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.sourceFiles -} - -tasks.withType(Javadoc) { - options.addStringOption('encoding', 'UTF-8') - options.addStringOption('docencoding', 'UTF-8') - options.addStringOption('charset', 'UTF-8') -} - -afterEvaluate { project -> - android.libraryVariants.all { variant -> - tasks.androidJavadocs.doFirst { - classpath += files(variant.javaCompile.classpath.files) - } - } -} - - diff --git a/platform/android/gradle/gradle-checkstyle.gradle b/platform/android/gradle/gradle-checkstyle.gradle deleted file mode 100644 index 8eb4baa858..0000000000 --- a/platform/android/gradle/gradle-checkstyle.gradle +++ /dev/null @@ -1,26 +0,0 @@ -apply plugin: 'checkstyle' - -checkstyle { - toolVersion = "7.1.1" // 7.3 - configFile = "../checkstyle.xml" as File -} - -task checkstyle(type: Checkstyle) { - description 'Checks if the code adheres to coding standards' - group 'verification' - configFile file("../checkstyle.xml") - source 'src' - include '**/*.java' - exclude '**/gen/**' - exclude '**/style/*LayerTest.java' - exclude '**/style/LightTest.java' - exclude '**/style/layers/Property.java' - exclude '**/style/layers/PropertyFactory.java' - exclude '**/style/layers/*Layer.java' - exclude '**/style/light/Light.java' - exclude '**/log/LoggerDefinition.java' - exclude '**/log/Logger.java' - exclude '**/Expression.java' - classpath = files() - ignoreFailures = false -} diff --git a/platform/android/gradle/gradle-config.gradle b/platform/android/gradle/gradle-config.gradle deleted file mode 100644 index 8346806633..0000000000 --- a/platform/android/gradle/gradle-config.gradle +++ /dev/null @@ -1,23 +0,0 @@ -// -// Configuration file for gradle build execution. -// - -task accessToken { - def tokenFile = new File("${projectDir}/src/main/res/values/developer-config.xml") - if (!tokenFile.exists()) { - String mapboxAccessToken = "$System.env.MAPBOX_ACCESS_TOKEN" - if (mapboxAccessToken == "null") { - System.out.println("You should set the MAPBOX_ACCESS_TOKEN environment variable.") - mapboxAccessToken = "YOUR_MAPBOX_ACCESS_TOKEN_GOES_HERE" - } - String tokenFileContents = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + - "<resources>\n" + - " <string name=\"mapbox_access_token\">" + mapboxAccessToken + "</string>\n" + - "</resources>" - tokenFile.write(tokenFileContents) - } -} - -gradle.projectsEvaluated { - preBuild.dependsOn('accessToken') -} diff --git a/platform/android/gradle/gradle-dependencies-graph.gradle b/platform/android/gradle/gradle-dependencies-graph.gradle deleted file mode 100644 index 5cbc7b974f..0000000000 --- a/platform/android/gradle/gradle-dependencies-graph.gradle +++ /dev/null @@ -1,29 +0,0 @@ -buildscript { - repositories { - mavenCentral() - } - - dependencies { - classpath "com.vanniktech:gradle-dependency-graph-generator-plugin:0.3.0" - } -} - -import com.vanniktech.dependency.graph.generator.DependencyGraphGeneratorPlugin -import com.vanniktech.dependency.graph.generator.DependencyGraphGeneratorExtension.Generator -import com.vanniktech.dependency.graph.generator.dot.GraphFormattingOptions -import com.vanniktech.dependency.graph.generator.dot.Color -import com.vanniktech.dependency.graph.generator.dot.Shape -import com.vanniktech.dependency.graph.generator.dot.Style - -plugins.apply(DependencyGraphGeneratorPlugin) - -def mapboxGenerator = new Generator( - "mapboxLibraries", // Suffix for our Gradle task. - "", // Root suffix that we don't want in this case. - { dependency -> dependency.getModuleGroup().startsWith("com.mapbox.mapboxsdk") }, // Only want Mapbox libs. - { dependency -> true }, // Include transitive dependencies. -) - -dependencyGraphGenerator { - generators = [mapboxGenerator] -} diff --git a/platform/android/gradle/gradle-javadoc.gradle b/platform/android/gradle/gradle-javadoc.gradle deleted file mode 100644 index ba530a9b62..0000000000 --- a/platform/android/gradle/gradle-javadoc.gradle +++ /dev/null @@ -1,18 +0,0 @@ -android.libraryVariants.all { variant -> - def name = variant.name - task "javadoc$name"(type: Javadoc) { - description = "Generates javadoc for build $name" - destinationDir = new File(destinationDir, variant.baseName) - source = variant.sourceSets.collect { it.java.sourceFiles }.inject { m, i -> m + i } - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) - options.windowTitle("Mapbox Maps SDK for Android $VERSION_NAME Reference") - options.docTitle("Mapbox Maps SDK for Android $VERSION_NAME") - options.header("Mapbox Maps SDK for Android $VERSION_NAME Reference") - options.bottom("© 2015–2019 Mapbox. All rights reserved.") - options.links("http://docs.oracle.com/javase/7/docs/api/") - options.linksOffline "http://d.android.com/reference","${android.sdkDirectory}/docs/reference" - options.overview("src/main/java/overview.html") - options.group("Mapbox Android SDK", "com.mapbox.*") - exclude '**/R.java', '**/BuildConfig.java', '**/**.java.ejs', '**/**.html' - } -}
\ No newline at end of file diff --git a/platform/android/gradle/gradle-lint.gradle b/platform/android/gradle/gradle-lint.gradle deleted file mode 100644 index cbebeaa74a..0000000000 --- a/platform/android/gradle/gradle-lint.gradle +++ /dev/null @@ -1,30 +0,0 @@ -task ciLint(type: Copy) { - if (isLocalBuild()) { - from "${projectDir}/lint/lint-baseline-local.xml" - into "${projectDir}" - rename { String fileName -> - fileName.replace("lint-baseline-local.xml", "lint-baseline.xml") - } - } else { - from "${projectDir}/lint/lint-baseline-ci.xml" - into "${projectDir}" - rename { String fileName -> - fileName.replace("lint-baseline-ci.xml", "lint-baseline.xml") - } - } -} - -def isLocalBuild() { - if (System.getenv('IS_LOCAL_DEVELOPMENT') != null) { - return System.getenv('IS_LOCAL_DEVELOPMENT').toBoolean() - } - return true -} - -lint.dependsOn ciLint - -tasks.whenTaskAdded { task -> - if (task.name == 'lintVitalRelease') { - task.dependsOn ciLint - } -}
\ No newline at end of file diff --git a/platform/android/gradle/gradle-make.gradle b/platform/android/gradle/gradle-make.gradle deleted file mode 100644 index 65d971cc96..0000000000 --- a/platform/android/gradle/gradle-make.gradle +++ /dev/null @@ -1,18 +0,0 @@ -// -// Contains GL-native make commands -// - -task makeClean(type: Exec) { - workingDir '../../' - commandLine 'make', 'clean' -} - -task makeAndroid(type: Exec) { - workingDir '../../' - commandLine 'make', 'android' -} - -task makeAndroidAll(type: Exec) { - workingDir '../../' - commandLine 'make', 'apackage' -} diff --git a/platform/android/gradle/gradle-update-vendor-modules.gradle b/platform/android/gradle/gradle-update-vendor-modules.gradle deleted file mode 100644 index e215450ec1..0000000000 --- a/platform/android/gradle/gradle-update-vendor-modules.gradle +++ /dev/null @@ -1,8 +0,0 @@ -task updateVendorSubmodules { - doLast { - exec { - workingDir = "${rootDir}" - commandLine "git", "submodule", "update", "--init", "vendor" - } - } -}
\ No newline at end of file diff --git a/platform/android/gradle/jacoco-report.gradle b/platform/android/gradle/jacoco-report.gradle deleted file mode 100644 index 64c99e09f0..0000000000 --- a/platform/android/gradle/jacoco-report.gradle +++ /dev/null @@ -1,33 +0,0 @@ -apply plugin: 'jacoco' -apply from: "${rootDir}/gradle/dependencies.gradle" - -jacoco { - toolVersion = versions.jacoco -} - -task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest']) { - group = "Reporting" - description = "Combine code coverage to unified report." - - reports { - xml.enabled = true - html.enabled = true - } - - def fileExcludes = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*'] - def debugTree = fileTree(dir: "${project.buildDir}/intermediates/javac/debug/classes", excludes: fileExcludes) - def mainSrc = "${project.projectDir}/src/main/java" - println(mainSrc) - def ecSrc = fileTree(dir: "$project.buildDir", include: "**/*.ec") - def execSrc = fileTree(dir: "$project.buildDir", include: "**/*.exec") - - doFirst { - def files = files([ecSrc, execSrc]).files - println "Creating Jacoco Report for ${files.size()} coverage files" - files.each { file -> println file } - } - - sourceDirectories.from = files([mainSrc]) - classDirectories.from = files([debugTree]) - executionData.from = files([ecSrc, execSrc]) -}
\ No newline at end of file diff --git a/platform/android/gradle/ktlint.gradle b/platform/android/gradle/ktlint.gradle deleted file mode 100644 index 31743ccd49..0000000000 --- a/platform/android/gradle/ktlint.gradle +++ /dev/null @@ -1,27 +0,0 @@ -apply from: "${rootDir}/gradle/dependencies.gradle" - -repositories { - jcenter() -} - -configurations { - ktlint -} - -dependencies { - ktlint dependenciesList.ktlint -} - -task ktlint(type: JavaExec, group: "verification") { - description = "Check Kotlin code style." - classpath = configurations.ktlint - main = "com.pinterest.ktlint.Main" - args "src/**/*.kt" -} - -task ktlintFormat(type: JavaExec, group: "formatting") { - description = "Fix Kotlin code style deviations." - classpath = configurations.ktlint - main = "com.pinterest.ktlint.Main" - args "-F", "src/**/*.kt" -}
\ No newline at end of file diff --git a/platform/android/gradle/native-build.gradle b/platform/android/gradle/native-build.gradle deleted file mode 100644 index 0c16c379dd..0000000000 --- a/platform/android/gradle/native-build.gradle +++ /dev/null @@ -1,70 +0,0 @@ -ext.nativeBuild = { nativeTargets -> - android { - defaultPublishConfig project.hasProperty("mapbox.buildtype") ? project.getProperty("mapbox.buildtype") : "debug" - - // We sometimes want to invoke Gradle without building a native dependency, e.g. when we just want - // to invoke the Java tests. When we explicitly specify an ABI of 'none', no native dependencies are - // added. When another ABI is specified explicitly, we're just going to build that ABI. In all other - // cases, all ABIs are built. - // - // When invoking from the command line or to override the device default, set `-Pmapbox.abis=...` to - // only build the desired architectures. - // - // When building from Android Studio, gradle.properties sets `android.buildOnlyTargetAbi=true` so that - // only the architecture for the device you're running on gets built. - def abi = 'all' - if (!project.hasProperty('android.injected.invoked.from.ide') || project.hasProperty("mapbox.abis")) { - // Errors when the user invokes Gradle from the command line and didn't set mapbox.abis - abi = project.getProperty("mapbox.abis") - } - - if (abi != 'none') { - externalNativeBuild { - cmake { - path "../../../CMakeLists.txt" - version "3.10.2" - } - } - } - - // Allow determining the C++ STL we're using when building Mapbox GL. - def stl = 'c++_static' - if (project.hasProperty("mapbox.stl")) { - stl = project.getProperty("mapbox.stl") - } - - defaultConfig { - if (abi != 'none') { - externalNativeBuild { - cmake { - arguments "-DANDROID_TOOLCHAIN=clang" - arguments "-DANDROID_STL=" + stl - arguments "-DANDROID_CPP_FEATURES=exceptions" - arguments "-DMBGL_PLATFORM=android" - arguments "-DMASON_PLATFORM=android" - arguments "-DNodeJS_EXECUTABLE=" + node - arguments "-Dnpm_EXECUTABLE=" + npm - - // Enable ccache if the user has installed it. - if (ccache?.trim()) { - arguments "-DANDROID_CCACHE=" + ccache - } - - cFlags "-Qunused-arguments" - cppFlags "-Qunused-arguments" - - for (target in nativeTargets) { - targets target - } - - if (abi != 'all') { - abiFilters abi.split(' ') - } else { - abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" - } - } - } - } - } - } -}
\ No newline at end of file diff --git a/platform/android/gradle/wrapper/gradle-wrapper.jar b/platform/android/gradle/wrapper/gradle-wrapper.jar Binary files differdeleted file mode 100644 index 51288f9c2f..0000000000 --- a/platform/android/gradle/wrapper/gradle-wrapper.jar +++ /dev/null diff --git a/platform/android/gradle/wrapper/gradle-wrapper.properties b/platform/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index efceced3ca..0000000000 --- a/platform/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue May 28 09:39:37 CEST 2019 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip |