File: build.gradle

package info (click to toggle)
csound 1%3A6.18.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 62,416 kB
  • sloc: ansic: 192,636; cpp: 14,151; javascript: 9,654; objc: 9,181; java: 3,337; python: 3,333; sh: 1,783; yacc: 1,255; xml: 985; perl: 635; lisp: 411; tcl: 341; lex: 217; makefile: 126
file content (62 lines) | stat: -rw-r--r-- 2,594 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Top-level build file where you can add configuration options common to all sub-projects/modules.
/*
See these issues for linking problems: https://github.com/android-ndk/ndk/issues/126
and https://github.com/android-ndk/ndk/issues/153.

@1bsyl from our experience at MicroBlink we recommend having compileSdkVersion always set to latest
stable API level (currently this is 24), targetSdkVersion set to latest API level with which you
have extensively tested your app (for us this is still 23, as we cannot test with 24 because
Android N is still not released - bugs and failures on preview versions can be attributed to both
bugs in your app as well as bugs in platform itself - this is why we usually wait for Google to
release official build of new Android version and then we test on it) and minSdkVersion set to
minimum API level your app supports (for us this is still 10 :-( ).

One example where you may put your targetSdkVersion to 21, while using compileSdkVersion on 24
would be case when you have not implemented Android M permission model in your app. Similarly, if
you have not prepared your app to work in multi-window environment introduced in Android N (will it
be called Nutella?) you should not set targetSdkVersion to 24 (setting it so would mean that you
have tested your app in multi window environment and this feature will be enabled for your app on
devices running Android N).

On NDK side, you should set APP_PLATFORM to same as minSdkVersion in build.grade to be absolutely
sure your app will work correctly. However, if you need NDK features that were introduced in
later API levels, you should set APP_PLATFORM to minimum API level which gives a feature you need
and then test intensively on lower API levels to ensure everything works (this may require some
weird hacks to ensure binary built with APP_PLATFORM=android-23 to work on Gingerbread :-P ).

So we should have:

compileSdkVersion 23
buildToolsVersion 23.0.3
targetSdkVersion 21
minSdkVersion 21
APP_PLATFORM android-21

*/
buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
    allprojects {
        gradle.projectsEvaluated {
            tasks.withType(JavaCompile) {
                options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
            }
        }
    }
}