"Fossies" - the Fresh Open Source Software Archive

Member "navit-0.5.6/build.gradle" (6 Mar 2021, 4441 Bytes) of package /linux/privat/navit-0.5.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Java source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "build.gradle": 0.5.5_vs_0.5.6.

    1 apply plugin: 'com.android.application'
    2 apply from: "$project.rootDir/gradle/scripts/git-scm-version.gradle"
    3 apply plugin: 'checkstyle'
    4 
    5 buildscript {
    6     repositories {
    7         google()
    8         jcenter()
    9         maven {
   10             url 'https://maven.google.com/'
   11             name 'Google'
   12         }
   13     }
   14     dependencies {
   15         classpath 'com.android.tools.build:gradle:3.5.0'
   16 
   17         // NOTE: Do not place your application dependencies here; they belong
   18         // in the individual module build.gradle files
   19     }
   20 }
   21 
   22 allprojects {
   23     repositories {
   24         google()
   25         jcenter()
   26         maven {
   27             url 'https://maven.google.com/'
   28             name 'Google'
   29         }
   30     }
   31 }
   32 
   33 /*
   34 task clean(type: Delete) {
   35     delete rootProject.buildDir
   36 }
   37 */
   38 android {
   39     compileSdkVersion 29
   40     buildToolsVersion "29.0.2"
   41     signingConfigs {
   42         release {
   43             // We can leave these in environment variables
   44             storeFile file(System.getenv("KEYSTORE")  ?: "/store")
   45             keyAlias System.getenv("KEY_ALIAS")
   46             storePassword System.getenv("STORE_PASS")
   47             keyPassword System.getenv("STORE_PASS")
   48         }
   49     }
   50     defaultConfig {
   51         applicationId "org.navitproject.navit"
   52         minSdkVersion 10
   53         targetSdkVersion 29
   54         versionCode gitVersionCode
   55         versionName gitVersionName
   56         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
   57         ndk {
   58             abiFilters 'x86', 'x86_64', 'arm64-v8a', 'armeabi-v7a'
   59         }
   60         externalNativeBuild {
   61             cmake {
   62                 arguments '-DDISABLE_CXX=y', '-DUSE_PLUGINS=n', '-DBUILD_MAPTOOL=n', '-DXSL_PROCESSING=n', '-DSAMPLE_MAP=n', '-DCMAKE_SYSROOT='+android.ndkDirectory+'/sysroot'
   63             }
   64         }
   65     }
   66     buildTypes {
   67         release {
   68             minifyEnabled false
   69             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
   70             if(file(System.getenv("KEYSTORE")  ?: "/store").exists()){
   71                 signingConfig signingConfigs.release
   72             }
   73         }
   74     }
   75     lintOptions {
   76         disable 'UnusedResources'
   77         abortOnError true
   78     }
   79     sourceSets {
   80         main {
   81             manifest.srcFile "navit/android/AndroidManifest.xml"
   82             java.srcDirs = ["navit/android/src"]
   83             resources.srcDirs = ["navit/android/src"]
   84             renderscript.srcDirs = ["navit/android/src"]
   85             res.srcDirs = ["navit/android/res", "android-builddir/android/res"]
   86             assets.srcDirs = ["navit/android/assets", "android-builddir/android/assets"]
   87             }
   88     }
   89     externalNativeBuild {
   90         cmake {
   91             buildStagingDirectory "./android-builddir"
   92             path 'CMakeLists.txt'
   93         }
   94     }
   95 
   96     task checkstyleMain(type: Checkstyle){
   97         source 'navit/android/src'
   98         include '**/*.java'
   99         configFile = rootProject.file('checkstyle.xml')
  100         ignoreFailures = false
  101         showViolations = true
  102         // empty classpath
  103         classpath = files()
  104         reports {
  105             include ('**/*.java')
  106             xml.enabled = true
  107             html.enabled = true
  108             xml {
  109                 destination file("checkstyle/checkstyleMain.xml")
  110             }
  111             html {
  112                 destination file("checkstyle/checkstyleMain.html")
  113             }
  114         }
  115 
  116         checkstyle {
  117             toolVersion = '8.26'
  118         }
  119     }
  120     applicationVariants.all { variant ->
  121         variant.outputs.all {
  122             outputFileName = "navit-${variant.buildType.name}.apk"
  123         }
  124         // create tasks to generate Javadocs
  125         task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) {
  126             source = android.sourceSets.main.java.srcDirs
  127             destinationDir = file("navit/android/build/outputs/docs/javadoc/")
  128             title = rootProject.name
  129             options.memberLevel = JavadocMemberLevel.PACKAGE
  130             verbose = true
  131             failOnError false
  132         }
  133     }
  134 
  135 }
  136 dependencies {
  137     implementation fileTree(include: ['*.jar'], dir: 'navit/android/libs')
  138     androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
  139         exclude group: 'com.android.support', module: 'support-annotations'
  140     })
  141     testImplementation 'junit:junit:4.12'
  142     implementation 'ch.acra:acra:4.9.2'
  143 //    implementation 'com.android.support:support-v4:28.0.0'
  144 }