Return-Path: X-Original-To: apmail-buildr-users-archive@www.apache.org Delivered-To: apmail-buildr-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63880F70F for ; Fri, 5 Apr 2013 22:28:39 +0000 (UTC) Received: (qmail 97750 invoked by uid 500); 5 Apr 2013 22:28:39 -0000 Delivered-To: apmail-buildr-users-archive@buildr.apache.org Received: (qmail 97707 invoked by uid 500); 5 Apr 2013 22:28:39 -0000 Mailing-List: contact users-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@buildr.apache.org Delivered-To: mailing list users@buildr.apache.org Received: (qmail 97696 invoked by uid 99); 5 Apr 2013 22:28:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 22:28:39 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alex.boisvert@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-wg0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 22:28:33 +0000 Received: by mail-wg0-f44.google.com with SMTP id z12so4176791wgg.23 for ; Fri, 05 Apr 2013 15:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=4jTwTDBDE6u8zCXs0rFeNCyD1GwbNRUZwHIhH3T4XOs=; b=VUGfVYi5OuThqfqkl63m0acNGhbZpsj2SYc75Y/t+EmPwQS42hOmw8vAESMRsBH8T6 EnnAhq8fBOMBZsgVzgGK1W7cFtkJZxDiMQQxisNhvOUjYNhEilyTeoSwFRcI4S1g3TkZ /V1/itk/lbZZYij5iCPwohME1lA9JzZhHu6yjnX3a3iqsDDsMVugknogM82AgcgONyQz ZmOTTBaNdBsZ5E8mL2lOjPiH5tlj9aA5n78Nh4CDzWVgd/7j8ymvc1hM26oQDFySZQPQ f9KMsqJJNvWSxUFHvNKHXVZeKwFZaTEJD/BLN7iFaQ/wCil5w69EHo3HyCfmdCyZHfcY tafg== MIME-Version: 1.0 X-Received: by 10.194.109.35 with SMTP id hp3mr19565827wjb.15.1365200893231; Fri, 05 Apr 2013 15:28:13 -0700 (PDT) Received: by 10.217.103.200 with HTTP; Fri, 5 Apr 2013 15:28:13 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Apr 2013 15:28:13 -0700 Message-ID: Subject: Re: Proguard and Ant Task From: Alex Boisvert To: users@buildr.apache.org Content-Type: multipart/alternative; boundary=089e010d857449cd6304d9a49afa X-Virus-Checked: Checked by ClamAV on apache.org --089e010d857449cd6304d9a49afa Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Khristian, I hacked something quickly together here: https://gist.github.com/aboisvert/5323180 I didn't use the Ant task since I thought it was too much trouble compared to using the Proguard 'main class' and passing argument directly to it. Note that this is just a prototype that doesn't support many of the proguard options .. basically the bare minimum to get you going. Hope this helps, alex On Fri, Apr 5, 2013 at 7:47 AM, Khristian Sch=F6nrock wrote: > Hello everyone, > I'm trying to add a proguard task to my project. So far I've not found an= y > sort of Proguard-addon for Buildr, so I tried using the Ant task. > > I tried to mimic the OpenJPA task, and ended up with the following code: > > REQUIRES =3D [ ...bunch of libraries... ] > > ant('proguard') do |ant| > ant.taskdef :name=3D>'proguard', :classname=3D>'proguard.ant.ProGuard= Task', > :classpath=3D>REQUIRES.join(File::PATH_SEPARATOR) > ant.proguard :configuration=3D>_('../build/configuration.pro'), # con= fig > file > :injars=3D>project('my_project') # snag here > end > > And so I am left with a bunch of intertwining questions: > > - Since I'm defining the task in a project that should be processed by > proguard, I'm not sure how I should add the project to the classpath. > - Moving the proguard task to some other project ("distribution", for > example) solves the problem, but proguard complains that I need to define > the "-injars" parameter, which I tried unsuccessfully with the :injars co= de > above. > - Since "-injars" is part of the configuration, in the Proguard Ant task = it > can be defined either in the configuration file ("configuration.pro"), or > in the body of the tag. Supposing the :configuration key > maps to this tag, can I add this "tag content"? > > How do I best configure this? > > Thanks in advance, > Khristian > --089e010d857449cd6304d9a49afa--