include: Added missing Header_* defines.
[wine.git] / dlls / wineandroid.drv / build.gradle.in
blob8ae2fb4764171ac96ae75cea5267fc8f8686c473
1 /*
2  * Gradle build script for Wine
3  *
4  * Copyright 2017 Alexandre Julliard
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
21 apply plugin: 'com.android.application'
23 buildscript
25     repositories
26     {
27         jcenter()
28     }
29     dependencies
30     {
31         classpath "com.android.tools.build:gradle:2.2.1"
32     }
35 def add_icon_task( dir, scale )
37     return tasks.create( "createIcon-" + dir, Exec ) {
38         def outdir = new File( "res", "drawable-" + dir )
39         outputs.dir( outdir )
40         doFirst { outdir.mkdirs() }
41         def png = new File( outdir, "wine.png" )
42         def svg = new File( "@srcdir@", "wine.svg" )
43         inputs.file( svg )
44         outputs.file( png )
45         commandLine "rsvg-convert", "-z", scale, "-o", png, svg
46     }
49 def checksum_task()
51     return tasks.create( "checksumAssets", Exec ) {
52         commandLine "sh", "-c",
53                     "(test -d assets && " +
54                     "rm -f assets/files.sum assets/sums.sum && " +
55                     "sha256sum \$(find assets -type f -print) | sed 's/ assets\\// /' >files.sum && " +
56                     "sha256sum files.sum >sums.sum && " +
57                     "mv files.sum sums.sum assets) || rm -rf assets";
58     }
61 tasks.whenTaskAdded
63     if (name.equals( "generateDebugResources" ))
64     {
65         dependsOn add_icon_task( "ldpi", 0.75 )
66         dependsOn add_icon_task( "mdpi", 1 )
67         dependsOn add_icon_task( "hdpi", 1.5 )
68         dependsOn add_icon_task( "xhdpi", 2 )
69         dependsOn add_icon_task( "xxhdpi", 3 )
70         dependsOn add_icon_task( "xxxhdpi", 4 )
71     }
72     if (name.equals( "generateDebugAssets" ))
73     {
74         dependsOn checksum_task()
75     }
78 tasks.withType(JavaCompile)
80     options.compilerArgs << "-Xlint"
83 android
85     compileSdkVersion 25
86     buildToolsVersion "25.0.3"
88     defaultConfig
89     {
90         applicationId "org.winehq.wine"
91         minSdkVersion 17
92         versionCode 1
93         versionName "@PACKAGE_VERSION@"
94         setProperty( "archivesBaseName", "wine" )
95     }
97     sourceSets
98     {
99         main.assets.srcDirs = [ "assets" ]
100         main.java.srcDirs = [ "@srcdir@" ]
101         main.jniLibs.srcDirs = [ "lib" ]
102         main.java.excludes = [ "build" ]
103         main.res.srcDirs = [ "res" ]
104         main.manifest.srcFile "@srcdir@/AndroidManifest.xml"
105     }