mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
Added maven support to build process
This commit is contained in:
parent
623f06d7bc
commit
b37ce633fe
2 changed files with 20 additions and 7 deletions
2
README
2
README
|
@ -25,6 +25,7 @@ To be able to auto-build packages, you're going to need:
|
|||
*The Android NDK
|
||||
*Ant
|
||||
*Ant Contrib Tasks (Debian package ant-contrib)
|
||||
*Maven (Debian package maven2)
|
||||
*JavaCC (Debian package javacc)
|
||||
*VCS clients: svn, git, hg, bzr
|
||||
*A keystore for holding release keys. (Safe, secure and well backed up!)
|
||||
|
@ -194,6 +195,7 @@ configuration to the build. These are:
|
|||
need to enable this.
|
||||
fixapos=yes Like fixtrans, but deals with an even older issue relating
|
||||
to 'unescaped apostrophes' in translation strings.
|
||||
maven=yes Build with maven instead of ant
|
||||
|
||||
Another example, using extra parameters:
|
||||
|
||||
|
|
13
build.py
13
build.py
|
@ -194,7 +194,8 @@ for app in apps:
|
|||
sys.exit(1)
|
||||
|
||||
# Generate (or update) the ant build file, build.xml...
|
||||
if thisbuild.get('update', 'yes') == 'yes':
|
||||
if (thisbuild.get('update', 'yes') == 'yes' and
|
||||
not thisbuild.has_key('maven')):
|
||||
parms = [os.path.join(sdk_path, 'tools', 'android'),
|
||||
'update', 'project', '-p', '.']
|
||||
parms.append('--subprojects')
|
||||
|
@ -419,6 +420,11 @@ for app in apps:
|
|||
print output
|
||||
|
||||
# Build the release...
|
||||
if thisbuild.has_key('maven'):
|
||||
p = subprocess.Popen(['mvn', 'clean', 'install',
|
||||
'-Dandroid.sdk.path=' + sdk_path],
|
||||
cwd=root_dir, stdout=subprocess.PIPE)
|
||||
else:
|
||||
if thisbuild.has_key('antcommand'):
|
||||
antcommand = thisbuild['antcommand']
|
||||
else:
|
||||
|
@ -443,6 +449,11 @@ for app in apps:
|
|||
# Special case (again!) for funambol...
|
||||
src = ("funambol-android-sync-client-" +
|
||||
thisbuild['version'] + "-unsigned.apk")
|
||||
elif thisbuild.has_key('maven'):
|
||||
src = re.match(r".*^\[INFO\] Installing /.*/([^/]*)\.apk",
|
||||
output, re.S|re.M).group(1)
|
||||
src = os.path.join(bindir, src) + '.apk'
|
||||
#[INFO] Installing /home/ciaran/fdroidserver/tmp/mainline/application/target/callerid-1.0-SNAPSHOT.apk
|
||||
else:
|
||||
src = re.match(r".*^.*Creating (\S+) for release.*$.*", output,
|
||||
re.S|re.M).group(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue