Package: libsmali-java / 2.1.3-1

revert-switch-to-jprante-s-jflex-plugin.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
From: Markus Koschany <apo@debian.org>
Date: Wed, 27 Jul 2016 11:00:08 +0200
Subject: revert switch to jprante's jflex plugin

I couldn't get it to work with the new version of gradle-jflex-plugin.
Whoever wants to give it a try, I have pushed my work to the experimental
branch (gradle-jflex-plugin). Gradle just couldn't find the new plugin.

Forwarded: not-needed
---
 build.gradle       |  3 ++-
 smali/build.gradle | 12 +++++++++---
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/build.gradle b/build.gradle
index f3c445d..22b493e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -107,7 +107,8 @@ subprojects {
                 antlr: 'org.antlr:antlr:3.5.2',
                 stringtemplate: 'org.antlr:stringtemplate:3.2.1',
                 commons_cli: 'commons-cli:commons-cli:1.2',
-                jflex_plugin: 'org.xbib.gradle.plugin:gradle-plugin-jflex:1.1.0',
+                jflex: 'de.jflex:jflex:1.6.1',
+                jflex_plugin: 'co.tomlee.gradle.plugins:gradle-jflex-plugin:0.0.2',
                 proguard_gradle: 'net.sf.proguard:proguard-gradle:5.2.1',
                 dx: 'com.google.android.tools:dx:1.7',
                 gson: 'com.google.code.gson:gson:2.3.1'
diff --git a/smali/build.gradle b/smali/build.gradle
index 318b5a9..a892399 100644
--- a/smali/build.gradle
+++ b/smali/build.gradle
@@ -30,7 +30,7 @@
  */
 
 apply plugin: 'antlr'
-apply plugin: 'org.xbib.gradle.plugin.jflex'
+apply plugin: 'jflex'
 
 buildscript {
     repositories {
@@ -46,8 +46,13 @@ configurations {
     // Remove the full antlr library that's added by the antlr plugin. We manually
     // add the smaller antlr_runtime library instead
     compile.exclude group: 'org.antlr', module: 'antlr'
+
+    // The jflex lexer doesn't have any runtime dependencies, so remove the dependency
+    // that gets added by the jflex plugin
+    compile.exclude group: 'de.jflex', module: 'jflex'
 }
 
+
 sourceSets {
     main {
         resources {
@@ -82,6 +87,7 @@ dependencies {
     testCompile depends.junit
 
     antlr depends.antlr
+    jflex depends.jflex
 }
 
 processResources.inputs.property('version', version)
@@ -114,8 +120,8 @@ generateGrammarSource {
     outputDirectory = new File(outputDirectory, 'org/jf/smali')
 }
 
-jflex {
-    generateDir = new File(generateDir, 'org/jf/smali')
+generateJFlexSource {
+    outputDirectory = new File(outputDirectory, 'org/jf/smali')
 }
 
 uploadArchives {