mirror of
https://github.com/moparisthebest/k-9
synced 2024-10-31 15:45:08 -04:00
Upgrade us to android-14 infrastructure
(Backport from Kaiten) Conflicts: build.xml default.properties plugins/ActionBar/project.properties plugins/QuickAction/project.properties plugins/SplitView/ant.properties plugins/SplitView/build.xml plugins/SplitView/local.properties plugins/SplitView/proguard.cfg plugins/SplitView/project.properties project.properties
This commit is contained in:
parent
b69d6cb64c
commit
188a9fd070
23
ant.properties
Normal file
23
ant.properties
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# This file is used to override default values used by the Ant build system.
|
||||||
|
#
|
||||||
|
# This file must be checked in Version Control Systems, as it is
|
||||||
|
# integral to the build system of your project.
|
||||||
|
|
||||||
|
# This file is only used by the Ant script.
|
||||||
|
|
||||||
|
# You can use this to override default values such as
|
||||||
|
# 'source.dir' for the location of your java source folder and
|
||||||
|
# 'out.dir' for the location of your output folder.
|
||||||
|
|
||||||
|
# You can also use it define how the release builds are signed by declaring
|
||||||
|
# the following properties:
|
||||||
|
# 'key.store' for the location of your keystore and
|
||||||
|
# 'key.alias' for the name of the key to use.
|
||||||
|
# The password will be asked during the build when you use the 'release' target.
|
||||||
|
|
||||||
|
# Indicates whether an apk should be generated for each density.
|
||||||
|
split.density=false
|
||||||
|
java.encoding=utf8
|
||||||
|
# Project target.
|
||||||
|
target=android-9
|
||||||
|
extensible.libs.classpath=compile-only-libs
|
@ -1,2 +0,0 @@
|
|||||||
application-package=com.fsck.k9
|
|
||||||
target=android-9
|
|
120
build.xml
120
build.xml
@ -1,15 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project name="K9" default="help">
|
<project name="K9" default="help">
|
||||||
|
|
||||||
<!-- The local.properties file is created and updated by the 'android'
|
<!-- The local.properties file is created and updated by the 'android' tool.
|
||||||
tool.
|
|
||||||
It contains the path to the SDK. It should *NOT* be checked into
|
It contains the path to the SDK. It should *NOT* be checked into
|
||||||
Version Control Systems. -->
|
Version Control Systems. -->
|
||||||
<property file="local.properties" />
|
<loadproperties srcFile="local.properties" />
|
||||||
|
|
||||||
<!-- The build.properties file can be created by you and is never touched
|
<!-- The ant.properties file can be created by you. It is only edited by the
|
||||||
by the 'android' tool. This is the place to change some of the
|
'android' tool to add properties to it.
|
||||||
default property values used by the Ant rules.
|
This is the place to change some Ant specific build properties.
|
||||||
Here are some properties you may want to change/update:
|
Here are some properties you may want to change/update:
|
||||||
|
|
||||||
source.dir
|
source.dir
|
||||||
@ -17,6 +16,9 @@
|
|||||||
out.dir
|
out.dir
|
||||||
The name of the output directory. Default is 'bin'.
|
The name of the output directory. Default is 'bin'.
|
||||||
|
|
||||||
|
For other overridable properties, look at the beginning of the rules
|
||||||
|
files in the SDK, at tools/ant/build.xml
|
||||||
|
|
||||||
Properties related to the SDK location or the project target should
|
Properties related to the SDK location or the project target should
|
||||||
be updated using the 'android' tool with the 'update' action.
|
be updated using the 'android' tool with the 'update' action.
|
||||||
|
|
||||||
@ -24,26 +26,62 @@
|
|||||||
application and should be checked into Version Control Systems.
|
application and should be checked into Version Control Systems.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<property file="build.properties" />
|
<property file="ant.properties" />
|
||||||
|
|
||||||
<!-- The default.properties file is created and updated by the 'android'
|
<!-- The project.properties file is created and updated by the 'android'
|
||||||
tool, as well as ADT.
|
tool, as well as ADT.
|
||||||
|
|
||||||
|
This contains project specific properties such as project target, and library
|
||||||
|
dependencies. Lower level build properties are stored in ant.properties
|
||||||
|
(or in .classpath for Eclipse projects).
|
||||||
|
|
||||||
This file is an integral part of the build system for your
|
This file is an integral part of the build system for your
|
||||||
application and should be checked into Version Control Systems. -->
|
application and should be checked into Version Control Systems. -->
|
||||||
<property file="default.properties" />
|
<loadproperties srcFile="project.properties" />
|
||||||
|
|
||||||
<!-- Custom Android task to deal with the project target, and import the
|
<!-- quick check on sdk.dir -->
|
||||||
proper rules.
|
<fail
|
||||||
This requires ant 1.6.0 or above. -->
|
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
|
||||||
<path id="android.antlibs">
|
unless="sdk.dir"
|
||||||
<pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
|
/>
|
||||||
<pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
|
|
||||||
<pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<taskdef name="setup"
|
|
||||||
classname="com.android.ant.SetupTask"
|
<!-- extension targets. Uncomment the ones where you want to do custom work
|
||||||
classpathref="android.antlibs" />
|
in between standard targets -->
|
||||||
|
<!--
|
||||||
|
<target name="-pre-build">
|
||||||
|
</target>
|
||||||
|
<target name="-pre-compile">
|
||||||
|
</target>
|
||||||
|
|
||||||
|
/* This is typically used for code obfuscation.
|
||||||
|
Compiled code location: ${out.classes.absolute.dir}
|
||||||
|
If this is not done in place, override ${out.dex.input.absolute.dir} */
|
||||||
|
<target name="-post-compile">
|
||||||
|
</target>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Import the actual build file.
|
||||||
|
|
||||||
|
To customize existing targets, there are two options:
|
||||||
|
- Customize only one target:
|
||||||
|
- copy/paste the target into this file, *before* the
|
||||||
|
<import> task.
|
||||||
|
- customize it to your needs.
|
||||||
|
- Customize the whole content of build.xml
|
||||||
|
- copy/paste the content of the rules files (minus the top node)
|
||||||
|
into this file, replacing the <import> task.
|
||||||
|
- customize to your needs.
|
||||||
|
|
||||||
|
***********************
|
||||||
|
****** IMPORTANT ******
|
||||||
|
***********************
|
||||||
|
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
||||||
|
in order to avoid having your file be overridden by tools such as "android update project"
|
||||||
|
-->
|
||||||
|
<!-- version-tag: custom -->
|
||||||
|
|
||||||
|
<!-- K9 CUSTOM STUFF -->
|
||||||
|
|
||||||
<!-- out folders for a parent project if this project is an instrumentation project -->
|
<!-- out folders for a parent project if this project is an instrumentation project -->
|
||||||
<property name="rclib" value="${out.dir}/K9RemoteControl.jar" />
|
<property name="rclib" value="${out.dir}/K9RemoteControl.jar" />
|
||||||
@ -96,15 +134,11 @@
|
|||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<!-- Create the output directories if they don't exist yet. -->
|
<!-- Create the output directories if they don't exist yet. -->
|
||||||
<target name="rclib" depends="compile">
|
<target name="rclib" depends="-compile">
|
||||||
<echo>Creating library ${rclib} for remote control
|
<echo>Creating library ${rclib} for remote control applications</echo>
|
||||||
applications</echo>
|
|
||||||
|
|
||||||
<jar destfile="${rclib}" basedir="${out.classes.dir}" includes="${rcdir}" />
|
<jar destfile="${rclib}" basedir="${out.classes.dir}" includes="${rcdir}" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="upload" depends="clean,get-version,release">
|
<target name="upload" depends="clean,get-version,release">
|
||||||
<echo>Uploading to Google Code using Google::Code::Upload</echo>
|
<echo>Uploading to Google Code using Google::Code::Upload</echo>
|
||||||
<exec executable="mv" failonerror="true">
|
<exec executable="mv" failonerror="true">
|
||||||
@ -134,12 +168,20 @@
|
|||||||
<arg path="${out.debug.file}" />
|
<arg path="${out.debug.file}" />
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
<!-- Re-Install the package on the default emulator -->
|
||||||
|
<target name="reinstall" depends="debug">
|
||||||
|
<echo>Reinstalling ${out.debug.file} onto default emulator...</echo>
|
||||||
|
<exec executable="${adb}" failonerror="true">
|
||||||
|
<arg value="install" />
|
||||||
|
<arg value="-r" />
|
||||||
|
<arg path="${out.debug.file}" />
|
||||||
|
</exec>
|
||||||
|
</target>
|
||||||
<target name="astyle">
|
<target name="astyle">
|
||||||
<exec executable="astyle" failonerror="true">
|
<exec executable="astyle" failonerror="true">
|
||||||
<arg line="--style=java --indent=spaces=4 --brackets=attach --convert-tabs --unpad-paren --pad-header --pad-oper --suffix=none --recursive 'src/com/fsck/k9/*.java'"/>
|
<arg line="--style=java --indent=spaces=4 --brackets=attach --convert-tabs --unpad-paren --pad-header --pad-oper --suffix=none --recursive 'src/com/fsck/k9/*.java'"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="help">
|
<target name="help">
|
||||||
<!-- displays starts at col 13
|
<!-- displays starts at col 13
|
||||||
|13 80| -->
|
|13 80| -->
|
||||||
@ -162,31 +204,13 @@
|
|||||||
<echo> eclipse: Apply template Eclipse settings</echo>
|
<echo> eclipse: Apply template Eclipse settings</echo>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<!-- Execute the Android Setup task that will setup some properties
|
|
||||||
specific to the target, and import the build rules files.
|
|
||||||
|
|
||||||
The rules file is imported from
|
|
||||||
<SDK>/platforms/<target_platform>/ant/ant_rules_r#.xml
|
|
||||||
|
|
||||||
To customize existing targets, there are two options:
|
|
||||||
- Customize only one target:
|
|
||||||
- copy/paste the target into this file, *before* the
|
|
||||||
<setup> task.
|
|
||||||
- customize it to your needs.
|
|
||||||
- Customize the whole script.
|
|
||||||
- copy/paste the content of the rules files (minus the top node)
|
|
||||||
into this file, *after* the <setup> task
|
|
||||||
- disable the import of the rules by changing the setup task
|
|
||||||
below to <setup import="false" />.
|
|
||||||
- customize to your needs.
|
|
||||||
-->
|
|
||||||
<setup />
|
|
||||||
|
|
||||||
<target name="eclipse" description="Apply template Eclipse settings">
|
<target name="eclipse" description="Apply template Eclipse settings">
|
||||||
<copy todir=".settings">
|
<copy todir=".settings">
|
||||||
<fileset dir="tools/eclipse-settings"/>
|
<fileset dir="tools/eclipse-settings"/>
|
||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<!-- END K-9 STUFF-->
|
||||||
|
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
40
proguard.cfg
Normal file
40
proguard.cfg
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
-optimizationpasses 5
|
||||||
|
-dontusemixedcaseclassnames
|
||||||
|
-dontskipnonpubliclibraryclasses
|
||||||
|
-dontpreverify
|
||||||
|
-verbose
|
||||||
|
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
|
||||||
|
|
||||||
|
-keep public class * extends android.app.Activity
|
||||||
|
-keep public class * extends android.app.Application
|
||||||
|
-keep public class * extends android.app.Service
|
||||||
|
-keep public class * extends android.content.BroadcastReceiver
|
||||||
|
-keep public class * extends android.content.ContentProvider
|
||||||
|
-keep public class * extends android.app.backup.BackupAgentHelper
|
||||||
|
-keep public class * extends android.preference.Preference
|
||||||
|
-keep public class com.android.vending.licensing.ILicensingService
|
||||||
|
|
||||||
|
-keepclasseswithmembernames class * {
|
||||||
|
native <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
public <init>(android.content.Context, android.util.AttributeSet);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclassmembers class * extends android.app.Activity {
|
||||||
|
public void *(android.view.View);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclassmembers enum * {
|
||||||
|
public static **[] values();
|
||||||
|
public static ** valueOf(java.lang.String);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keep class * implements android.os.Parcelable {
|
||||||
|
public static final android.os.Parcelable$Creator *;
|
||||||
|
}
|
@ -4,12 +4,12 @@
|
|||||||
# This file must be checked in Version Control Systems.
|
# This file must be checked in Version Control Systems.
|
||||||
#
|
#
|
||||||
# To customize properties used by the Ant build system use,
|
# To customize properties used by the Ant build system use,
|
||||||
# "build.properties", and override values to adapt the script to your
|
# "ant.properties", and override values to adapt the script to your
|
||||||
# project structure.
|
# project structure.
|
||||||
|
|
||||||
# Indicates whether an apk should be generated for each density.
|
# Indicates whether an apk should be generated for each density.
|
||||||
split.density=false
|
split.density=false
|
||||||
# Project target.
|
|
||||||
target=android-10
|
|
||||||
extensible.libs.classpath=compile-only-libs
|
|
||||||
java.encoding=utf8
|
java.encoding=utf8
|
||||||
|
# Project target.
|
||||||
|
target=android-9
|
||||||
|
extensible.libs.classpath=compile-only-libs
|
@ -1,15 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project name="K9Test" default="help">
|
<project name="K9" default="help">
|
||||||
|
|
||||||
<!-- The local.properties file is created and updated by the 'android'
|
<!-- The local.properties file is created and updated by the 'android' tool.
|
||||||
tool.
|
|
||||||
It contains the path to the SDK. It should *NOT* be checked into
|
It contains the path to the SDK. It should *NOT* be checked into
|
||||||
Version Control Systems. -->
|
Version Control Systems. -->
|
||||||
<property file="local.properties" />
|
<loadproperties srcFile="local.properties" />
|
||||||
|
|
||||||
<!-- The build.properties file can be created by you and is never touched
|
<!-- The ant.properties file can be created by you. It is only edited by the
|
||||||
by the 'android' tool. This is the place to change some of the
|
'android' tool to add properties to it.
|
||||||
default property values used by the Ant rules.
|
This is the place to change some Ant specific build properties.
|
||||||
Here are some properties you may want to change/update:
|
Here are some properties you may want to change/update:
|
||||||
|
|
||||||
source.dir
|
source.dir
|
||||||
@ -17,6 +16,9 @@
|
|||||||
out.dir
|
out.dir
|
||||||
The name of the output directory. Default is 'bin'.
|
The name of the output directory. Default is 'bin'.
|
||||||
|
|
||||||
|
For other overridable properties, look at the beginning of the rules
|
||||||
|
files in the SDK, at tools/ant/build.xml
|
||||||
|
|
||||||
Properties related to the SDK location or the project target should
|
Properties related to the SDK location or the project target should
|
||||||
be updated using the 'android' tool with the 'update' action.
|
be updated using the 'android' tool with the 'update' action.
|
||||||
|
|
||||||
@ -24,26 +26,25 @@
|
|||||||
application and should be checked into Version Control Systems.
|
application and should be checked into Version Control Systems.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<property file="build.properties" />
|
<property file="ant.properties" />
|
||||||
|
|
||||||
<!-- The default.properties file is created and updated by the 'android'
|
<!-- The project.properties file is created and updated by the 'android'
|
||||||
tool, as well as ADT.
|
tool, as well as ADT.
|
||||||
|
|
||||||
|
This contains project specific properties such as project target, and library
|
||||||
|
dependencies. Lower level build properties are stored in ant.properties
|
||||||
|
(or in .classpath for Eclipse projects).
|
||||||
|
|
||||||
This file is an integral part of the build system for your
|
This file is an integral part of the build system for your
|
||||||
application and should be checked into Version Control Systems. -->
|
application and should be checked into Version Control Systems. -->
|
||||||
<property file="default.properties" />
|
<loadproperties srcFile="project.properties" />
|
||||||
|
|
||||||
<!-- Custom Android task to deal with the project target, and import the
|
<!-- quick check on sdk.dir -->
|
||||||
proper rules.
|
<fail
|
||||||
This requires ant 1.6.0 or above. -->
|
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
|
||||||
<path id="android.antlibs">
|
unless="sdk.dir"
|
||||||
<pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
|
/>
|
||||||
<pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
|
|
||||||
<pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<taskdef name="setup"
|
|
||||||
classname="com.android.ant.SetupTask"
|
|
||||||
classpathref="android.antlibs" />
|
|
||||||
|
|
||||||
<!-- extension targets. Uncomment the ones where you want to do custom work
|
<!-- extension targets. Uncomment the ones where you want to do custom work
|
||||||
in between standard targets -->
|
in between standard targets -->
|
||||||
@ -53,32 +54,32 @@
|
|||||||
<target name="-pre-compile">
|
<target name="-pre-compile">
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
[This is typically used for code obfuscation.
|
/* This is typically used for code obfuscation.
|
||||||
Compiled code location: ${out.classes.absolute.dir}
|
Compiled code location: ${out.classes.absolute.dir}
|
||||||
If this is not done in place, override ${out.dex.input.absolute.dir}]
|
If this is not done in place, override ${out.dex.input.absolute.dir} */
|
||||||
<target name="-post-compile">
|
<target name="-post-compile">
|
||||||
</target>
|
</target>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- Import the actual build file.
|
||||||
<!-- Execute the Android Setup task that will setup some properties
|
|
||||||
specific to the target, and import the build rules files.
|
|
||||||
|
|
||||||
The rules file is imported from
|
|
||||||
<SDK>/platforms/<target_platform>/ant/ant_rules_r#.xml
|
|
||||||
|
|
||||||
To customize existing targets, there are two options:
|
To customize existing targets, there are two options:
|
||||||
- Customize only one target:
|
- Customize only one target:
|
||||||
- copy/paste the target into this file, *before* the
|
- copy/paste the target into this file, *before* the
|
||||||
<setup> task.
|
<import> task.
|
||||||
- customize it to your needs.
|
- customize it to your needs.
|
||||||
- Customize the whole script.
|
- Customize the whole content of build.xml
|
||||||
- copy/paste the content of the rules files (minus the top node)
|
- copy/paste the content of the rules files (minus the top node)
|
||||||
into this file, *after* the <setup> task
|
into this file, replacing the <import> task.
|
||||||
- disable the import of the rules by changing the setup task
|
|
||||||
below to <setup import="false" />.
|
|
||||||
- customize to your needs.
|
- customize to your needs.
|
||||||
|
|
||||||
|
***********************
|
||||||
|
****** IMPORTANT ******
|
||||||
|
***********************
|
||||||
|
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
||||||
|
in order to avoid having your file be overridden by tools such as "android update project"
|
||||||
-->
|
-->
|
||||||
<setup />
|
<!-- version-tag: 1 -->
|
||||||
|
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -18,14 +18,18 @@
|
|||||||
native <methods>;
|
native <methods>;
|
||||||
}
|
}
|
||||||
|
|
||||||
-keepclasseswithmembernames class * {
|
-keepclasseswithmembers class * {
|
||||||
public <init>(android.content.Context, android.util.AttributeSet);
|
public <init>(android.content.Context, android.util.AttributeSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
-keepclasseswithmembernames class * {
|
-keepclasseswithmembers class * {
|
||||||
public <init>(android.content.Context, android.util.AttributeSet, int);
|
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-keepclassmembers class * extends android.app.Activity {
|
||||||
|
public void *(android.view.View);
|
||||||
|
}
|
||||||
|
|
||||||
-keepclassmembers enum * {
|
-keepclassmembers enum * {
|
||||||
public static **[] values();
|
public static **[] values();
|
||||||
public static ** valueOf(java.lang.String);
|
public static ** valueOf(java.lang.String);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# This file must be checked in Version Control Systems.
|
# This file must be checked in Version Control Systems.
|
||||||
#
|
#
|
||||||
# To customize properties used by the Ant build system use,
|
# To customize properties used by the Ant build system use,
|
||||||
# "build.properties", and override values to adapt the script to your
|
# "ant.properties", and override values to adapt the script to your
|
||||||
# project structure.
|
# project structure.
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
Loading…
Reference in New Issue
Block a user