Skip to content

Commit ad22a6c

Browse files
committed
fixing maveneclipse example to use the recent android and androidannotations versions
1 parent 58ea120 commit ad22a6c

8 files changed

Lines changed: 50 additions & 50 deletions

File tree

examples/maveneclipse/.factorypath

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/maveneclipse/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
1+
# Maven
12
target
3+
4+
#Android
25
gen
6+
bin
7+
8+
# Eclipse
39
.classpath
410
.apt_generated
11+
.factorypath
12+
.settings
513
.project
614
org.eclipse.jdt.core.prefs
715
org.maven.ide.eclipse.prefs
16+
17+
# Idea
818
*.ipr
919
*.iws
1020
*.iml

examples/maveneclipse/.settings/org.eclipse.jdt.apt.core.prefs

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/maveneclipse/default.properties

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/maveneclipse/pom.xml

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,65 +10,55 @@
1010

1111
<properties>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13+
<android.version>4.1.1.4</android.version>
14+
<android.platform>16</android.platform>
15+
<androidannotations.version>2.7</androidannotations.version>
16+
<java.version>1.6</java.version>
1317
</properties>
1418

1519
<dependencies>
1620
<dependency>
1721
<groupId>com.google.android</groupId>
1822
<artifactId>android</artifactId>
19-
<version>2.2.1</version>
23+
<version>${android.version}</version>
2024
<scope>provided</scope>
2125
</dependency>
2226
<dependency>
2327
<groupId>com.googlecode.androidannotations</groupId>
2428
<artifactId>androidannotations</artifactId>
25-
<version>2.1-SNAPSHOT</version>
26-
<scope>compile</scope>
29+
<version>${androidannotations.version}</version>
30+
<scope>provided</scope>
2731
</dependency>
2832
<dependency>
2933
<groupId>com.googlecode.androidannotations</groupId>
30-
<artifactId>androidannotations</artifactId>
31-
<classifier>api</classifier>
32-
<version>2.1-SNAPSHOT</version>
34+
<artifactId>androidannotations-api</artifactId>
35+
<version>${androidannotations.version}</version>
3336
</dependency>
3437
</dependencies>
3538

3639
<build>
3740
<plugins>
41+
<plugin>
42+
<artifactId>maven-compiler-plugin</artifactId>
43+
<version>2.5.1</version>
44+
<configuration>
45+
<source>${java.version}</source>
46+
<target>${java.version}</target>
47+
</configuration>
48+
</plugin>
3849
<plugin>
3950
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
40-
<artifactId>maven-android-plugin</artifactId>
41-
<version>2.8.3</version>
51+
<artifactId>android-maven-plugin</artifactId>
52+
<version>3.4.0</version>
4253
<configuration>
43-
<androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
44-
<assetsDirectory>${project.basedir}/assets</assetsDirectory>
45-
<resourceDirectory>${project.basedir}/res</resourceDirectory>
46-
<nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
4754
<sdk>
48-
<platform>7</platform>
55+
<platform>${android.platform}</platform>
4956
</sdk>
50-
<deleteConflictingFiles>true</deleteConflictingFiles>
5157
<undeployBeforeDeploy>true</undeployBeforeDeploy>
5258
</configuration>
5359
<extensions>true</extensions>
5460
</plugin>
55-
<plugin>
56-
<artifactId>maven-compiler-plugin</artifactId>
57-
<version>2.3.2</version>
58-
<configuration>
59-
<source>1.6</source>
60-
<target>1.6</target>
61-
</configuration>
62-
</plugin>
6361
</plugins>
6462
</build>
6563

66-
<repositories>
67-
<repository>
68-
<id>androidannotations-repository</id>
69-
<name>androidannotations Maven2 repository</name>
70-
<url>http://androidannotations.googlecode.com/svn/repository/snapshots</url>
71-
</repository>
72-
</repositories>
73-
7464
</project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system edit
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
#
10+
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11+
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12+
13+
# Project target.
14+
target=android-7

examples/maveneclipse/src/main/java/com/googlecode/androidannotations/maveneclipse/HelloAndroidActivity.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,27 @@
33
import java.util.Date;
44

55
import android.app.Activity;
6-
import android.os.Bundle;
76
import android.widget.TextView;
87

8+
import com.googlecode.androidannotations.annotations.AfterViews;
99
import com.googlecode.androidannotations.annotations.EActivity;
1010
import com.googlecode.androidannotations.annotations.ViewById;
1111
import com.googlecode.androidannotations.annotations.res.StringRes;
1212

1313
@EActivity(R.layout.main)
1414
public class HelloAndroidActivity extends Activity {
15-
15+
1616
@StringRes
1717
String hello;
18-
18+
1919
@ViewById
2020
TextView helloTextView;
21-
22-
@Override
23-
protected void onCreate(Bundle savedInstanceState) {
24-
super.onCreate(savedInstanceState);
21+
22+
@AfterViews
23+
void initViews() {
2524
Date now = new Date();
2625
String helloMessage = String.format(hello, now.toString());
2726
helloTextView.setText(helloMessage);
2827
}
2928

3029
}
31-

examples/maveneclipse/src/test/java/.gitignore

Whitespace-only changes.

0 commit comments

Comments
 (0)