Сборка проекта Ant

Ответить
Аватара пользователя
rezak90
Сообщения: 3422
Зарегистрирован: 26 июн 2012, 13:22
Откуда: UA
Контактная информация:

Сборка проекта Ant

Сообщение rezak90 » 09 окт 2013, 16:12

3-й день сижу, ошибка вообще смешная. Вот что имею:
build.xml
[syntax=xml]<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project
name="FfmpegTest"
basedir="."
default="build" >

<property environment="env" />

<property
name="debuglevel"
value="source,lines,vars" />

<property
name="target"
value="1.6" />

<property file="ant.properties" />

<property file="project.properties" />

<loadproperties srcFile="project.properties" />

<property file="local.properties" />

<path id="Android 4.3.libraryclasspath" >

<pathelement location="../../BeaconMountain/ADT/sdk/platforms/android-18/android.jar" />
</path>

<path id="Android Private Libraries.libraryclasspath" >

<pathelement location="libs/android-support-v4.jar" />
</path>

<path id="Android Dependencies.libraryclasspath" />

<path id="FfmpegTest.classpath" >

<pathelement location="bin/classes" />

<path refid="Android 4.3.libraryclasspath" />

<path refid="Android Private Libraries.libraryclasspath" />

<path refid="Android Dependencies.libraryclasspath" />
</path>

<import file="${sdk.dir}/apache-ant-1.9.1/bin/build.xml"/>

<target name="init" >

<mkdir dir="bin/classes" />

<copy
includeemptydirs="false"
todir="bin/classes" >

<fileset dir="src" >

<exclude name="**/*.java" />
</fileset>
</copy>

<copy
includeemptydirs="false"
todir="bin/classes" >

<fileset dir="gen" >

<exclude name="**/*.java" />
</fileset>
</copy>
</target>

<target name="clean" >

<delete dir="bin/classes" />
</target>

<target
name="cleanall"
depends="clean" />

<target
name="build"
depends="build-subprojects,build-project" />

<target name="build-subprojects" />

<target name="-set-mode-check" >

<fail
if="out.final.file"
message="Cannot run two different modes at the same time. If you are running more than one debug/release/instrument type targets, call them from different Ant calls." />
</target>

<target
name="-release-prompt-for-password"
if="has.keystore"
unless="has.password" >

<!-- Gets passwords -->

<input
addproperty="key.store.password"
message="Please enter keystore password (store:${key.store}):" />

<input
addproperty="key.alias.password"
message="Please enter password for alias &apos;${key.alias}&apos;:" />
</target>

<target
name="build-project"
depends="init" >

<echo message="${ant.project.name}: ${ant.file}" />

<javac
debug="true"
debuglevel="${debuglevel}"
destdir="bin/classes"
includeantruntime="false"
source="${source}"
target="${target}" >

<src path="src" />

<src path="gen" />

<classpath refid="FfmpegTest.classpath" />
</javac>
</target>

<target
name="release">
<sequential>

<echo level="info" >keystore: ${key.store} Signing final apk...</echo>

<signapk
input="${out.packaged.file}"
output="${out.unaligned.file}"
keystore="${key.store}"
storepass="${key.store.password}"
alias="${key.alias}"
keypass="${key.alias.password}"/>

<echo level="info" >Release Package: ${out.final.file}</echo>
<zipalign-helper
in.package="${out.unaligned.file}"
out.package="${out.final.file}" />
<echo level="info">Release Package: ${out.final.file}</echo>
</sequential>

<record-build-info />
</target>

<target
name="build-refprojects"
description="Build all projects which reference this project. Useful to propagate changes." />

<target
name="init-eclipse-compiler"
description="copy Eclipse compiler jars to ant lib directory" >

<copy todir="${ant.library.dir}" >

<fileset
dir="${ECLIPSE_HOME}/plugins"
includes="org.eclipse.jdt.core_*.jar" />
</copy>

<unzip dest="${ant.library.dir}" >

<patternset includes="jdtCompilerAdapter.jar" />

<fileset
dir="${ECLIPSE_HOME}/plugins"
includes="org.eclipse.jdt.core_*.jar" />
</unzip>
</target>

<target
name="build-eclipse-compiler"
description="compile project with Eclipse compiler" >

<property
name="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter" />

<antcall target="build" />
</target>

</project>[/syntax]
ant.properties
key.store=android.keystore
key.alias=ffmpeg
key.store.password=qwerty123
key.alias.password=qwerty123
local.properties
ECLIPSE_HOME=C:\\Intel\\BeaconMountain\\ADT\\eclipse
out.packaged.file=.raw\\ffmpeg-debug-unaligned.apk
out.unaligned.file=.raw\\ffmpeg-unaligned.apk
out.final.file=.raw\\ffmpeg-final.apk
sdk.dir=C:\\Android\\android-sdk
запускаю ant release , выдаёт следующее:
C:\Intel\workspace\FfmpegTest>ant release
Buildfile: C:\Intel\workspace\FfmpegTest\build.xml

release:
[echo]
[echo] keystore: android Signing final apk...
[echo]

BUILD FAILED
C:\Intel\workspace\FfmpegTest\build.xml:163: C:\Intel\workspace\FfmpegTest\andro
id (The system cannot find the file specified)

Total time: 0 seconds
как винда не может найти этот файл, или идентифицировать его не может, хрен не пойму...
думал может добавить разрешение кейстору, в итоге
C:\Intel\workspace\FfmpegTest>ant release
Buildfile: C:\Intel\workspace\FfmpegTest\build.xml

release:
[echo] keystore: android.keystore Signing final apk...

BUILD FAILED
C:\Intel\workspace\FfmpegTest\build.xml:147: Keystore 'C:\Intel\workspace\Ffmpeg
Test\android.keystore' is not found!

Total time: 0 seconds
так вообще не может найти... как? 1) он там есть полюбому :o ; 2) в путях даже пробела нету в названиях папок (ну есть такой прикол на винде)

В чём ..ять ошибка?
R.id.team
Политика на форуме запрещена

Аватара пользователя
rezak90
Сообщения: 3422
Зарегистрирован: 26 июн 2012, 13:22
Откуда: UA
Контактная информация:

Re: Сборка проекта Ant

Сообщение rezak90 » 11 окт 2013, 12:40

UP. Я понимаю что эта тема далеко многим =) Но может есть хоть кто то, кто собирал проекты антом, может бывшие джависты...
R.id.team
Политика на форуме запрещена

Ответить