mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-17 18:50:11 +02:00
Allow for maven=yes@dir like gradle
This commit is contained in:
parent
548c5f606c
commit
8c583ec7bc
@ -354,7 +354,12 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
|||||||
print "Cleaning Maven project..."
|
print "Cleaning Maven project..."
|
||||||
cmd = [mvn3, 'clean', '-Dandroid.sdk.path=' + sdk_path]
|
cmd = [mvn3, 'clean', '-Dandroid.sdk.path=' + sdk_path]
|
||||||
|
|
||||||
p = FDroidPopen(cmd, cwd=root_dir, verbose=verbose)
|
if '@' in thisbuild['maven']:
|
||||||
|
maven_dir = os.path.join(root_dir, thisbuild['maven'].split('@')[1])
|
||||||
|
else:
|
||||||
|
maven_dir = root_dir
|
||||||
|
|
||||||
|
p = FDroidPopen(cmd, cwd=maven_dir, verbose=verbose)
|
||||||
elif 'gradle' in thisbuild:
|
elif 'gradle' in thisbuild:
|
||||||
print "Cleaning Gradle project..."
|
print "Cleaning Gradle project..."
|
||||||
cmd = [gradle, 'clean']
|
cmd = [gradle, 'clean']
|
||||||
@ -459,21 +464,31 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
|||||||
# Build the release...
|
# Build the release...
|
||||||
if 'maven' in thisbuild:
|
if 'maven' in thisbuild:
|
||||||
print "Building Maven project..."
|
print "Building Maven project..."
|
||||||
|
|
||||||
|
if '@' in thisbuild['maven']:
|
||||||
|
maven_dir = os.path.join(root_dir, thisbuild['maven'].split('@')[1])
|
||||||
|
else:
|
||||||
|
maven_dir = root_dir
|
||||||
|
|
||||||
mvncmd = [mvn3, '-Dandroid.sdk.path=' + sdk_path]
|
mvncmd = [mvn3, '-Dandroid.sdk.path=' + sdk_path]
|
||||||
if install:
|
if install:
|
||||||
mvncmd += ['-Dandroid.sign.debug=true', 'package', 'android:deploy']
|
mvncmd += ['-Dandroid.sign.debug=true', 'package', 'android:deploy']
|
||||||
else:
|
else:
|
||||||
mvncmd += ['-Dandroid.sign.debug=false', '-Dandroid.release=true', 'target']
|
mvncmd += ['-Dandroid.sign.debug=false', '-Dandroid.release=true', 'package']
|
||||||
if 'target' in thisbuild:
|
if 'target' in thisbuild:
|
||||||
target = thisbuild["target"].split('-')[1]
|
target = thisbuild["target"].split('-')[1]
|
||||||
subprocess.call(['sed', '-i',
|
subprocess.call(['sed', '-i',
|
||||||
's@<platform>[0-9]*</platform>@<platform>'+target+'</platform>@g',
|
's@<platform>[0-9]*</platform>@<platform>'+target+'</platform>@g',
|
||||||
'pom.xml'], cwd=root_dir)
|
'pom.xml'], cwd=root_dir)
|
||||||
|
if '@' in thisbuild['maven']:
|
||||||
|
subprocess.call(['sed', '-i',
|
||||||
|
's@<platform>[0-9]*</platform>@<platform>'+target+'</platform>@g',
|
||||||
|
'pom.xml'], cwd=maven_dir)
|
||||||
|
|
||||||
if 'mvnflags' in thisbuild:
|
if 'mvnflags' in thisbuild:
|
||||||
mvncmd += thisbuild['mvnflags']
|
mvncmd += thisbuild['mvnflags']
|
||||||
|
|
||||||
p = FDroidPopen(mvncmd, cwd=root_dir, verbose=verbose, apkoutput=True)
|
p = FDroidPopen(mvncmd, cwd=maven_dir, verbose=verbose, apkoutput=True)
|
||||||
|
|
||||||
elif 'gradle' in thisbuild:
|
elif 'gradle' in thisbuild:
|
||||||
print "Building Gradle project..."
|
print "Building Gradle project..."
|
||||||
|
Loading…
Reference in New Issue
Block a user