Skip to content

Commit f69ad03

Browse files
Work for build Android aar bundle
1 parent 098ecdb commit f69ad03

File tree

4 files changed

+138
-19
lines changed

4 files changed

+138
-19
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ gen/
1111
external/openssl
1212
external/sqlcipher
1313
libs/
14+
*.zip

AndroidManifest.xml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="net.sqlcipher" android:versionCode="4"
4-
android:versionName="v1 (0.0.6.FINAL)">
5-
<uses-sdk android:minSdkVersion="7"></uses-sdk>
6-
<application android:icon="@drawable/icon" android:label="@string/app_name">
7-
8-
<activity android:name="example.SQLDemoActivity">
9-
<intent-filter>
10-
<action android:name="android.intent.action.MAIN" />
11-
<category android:name="android.intent.category.LAUNCHER" />
12-
</intent-filter>
13-
</activity>
14-
</application>
15-
16-
17-
</manifest>
3+
package="net.sqlcipher" android:versionCode="1" android:versionName="1.0">
4+
<uses-sdk android:minSdkVersion="7" />
5+
</manifest>

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ SQLCIPHER_DIR := ${EXTERNAL_DIR}/sqlcipher
77
LICENSE := SQLCIPHER_LICENSE
88
ASSETS_DIR := assets
99
OPENSSL_DIR := ${EXTERNAL_DIR}/openssl
10-
GIT_DESCRIBE := $(shell git describe)
1110
LATEST_TAG := $(shell git tag | sort -r | head -1)
1211
SECOND_LATEST_TAG := $(shell git tag | sort -r | head -2 | tail -1)
13-
RELEASE_DIR := sqlcipher-for-android-${GIT_DESCRIBE}
14-
CHANGE_LOG_HEADER := "Changes included in the ${GIT_DESCRIBE} release of SQLCipher for Android:"
12+
RELEASE_DIR := sqlcipher-for-android-${LATEST_TAG}
13+
CHANGE_LOG_HEADER := "Changes included in the ${LATEST_TAG} release of SQLCipher for Android:"
1514
README := ${RELEASE_DIR}/README
1615

1716
# Use faketime to freeze time to make for reproducible builds.
@@ -53,7 +52,14 @@ build-jni:
5352
build-java:
5453
$(FAKETIME_5) ant release
5554

56-
release:
55+
release: release-zip release-aar
56+
57+
release-aar: release
58+
-rm libs/sqlcipher.jar
59+
-rm libs/sqlcipher-javadoc.jar
60+
mvn package
61+
62+
release-zip:
5763
-rm -rf ${RELEASE_DIR}
5864
-rm ${RELEASE_DIR}.zip
5965
mkdir ${RELEASE_DIR}

pom.xml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>net.zetetic</groupId>
5+
<artifactId>android-database-sqlcipher</artifactId>
6+
<version>3.3.1</version>
7+
<packaging>aar</packaging>
8+
<name>android-database-sqlcipher</name>
9+
<description>
10+
SQLCipher for Android is a plugin to SQLite that provides full database encryption.
11+
</description>
12+
<url>https://www.zetetic.net/sqlcipher/</url>
13+
<licenses>
14+
<license>
15+
<url>https://www.zetetic.net/sqlcipher/license/</url>
16+
</license>
17+
</licenses>
18+
<developers>
19+
<developer>
20+
<name>Zetetic Support</name>
21+
<email>support@zetetic.net</email>
22+
<organization>Zetetic LLC</organization>
23+
<organizationUrl>https://www.zetetic.net/</organizationUrl>
24+
</developer>
25+
</developers>
26+
<scm>
27+
<connection>scm:git:https://github.com/sqlcipher/android-database-sqlcipher.git</connection>
28+
<developerConnection>scm:git:https://github.com/sqlcipher/android-database-sqlcipher.git</developerConnection>
29+
<url>https://github.com/sqlcipher/android-database-sqlcipher.git</url>
30+
</scm>
31+
<distributionManagement>
32+
<snapshotRepository>
33+
<id>ossrh</id>
34+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
35+
</snapshotRepository>
36+
<repository>
37+
<id>ossrh</id>
38+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
39+
</repository>
40+
</distributionManagement>
41+
<build>
42+
<directory>bin/</directory>
43+
<plugins>
44+
<plugin>
45+
<groupId>com.simpligility.maven.plugins</groupId>
46+
<artifactId>android-maven-plugin</artifactId>
47+
<version>4.3.0</version>
48+
<extensions>true</extensions>
49+
<configuration>
50+
<sign>
51+
<debug>false</debug>
52+
</sign>
53+
<androidManifestFile>AndroidManifest.xml</androidManifestFile>
54+
<resourceDirectory>res</resourceDirectory>
55+
<assetsDirectory>assets</assetsDirectory>
56+
<nativeLibrariesDirectory>libs</nativeLibrariesDirectory>
57+
<release>true</release>
58+
</configuration>
59+
</plugin>
60+
<plugin>
61+
<groupId>org.apache.maven.plugins</groupId>
62+
<artifactId>maven-source-plugin</artifactId>
63+
<version>2.2.1</version>
64+
<executions>
65+
<execution>
66+
<id>attach-sources</id>
67+
<goals>
68+
<goal>jar-no-fork</goal>
69+
</goals>
70+
</execution>
71+
</executions>
72+
</plugin>
73+
<plugin>
74+
<groupId>org.apache.maven.plugins</groupId>
75+
<artifactId>maven-javadoc-plugin</artifactId>
76+
<version>2.9.1</version>
77+
<executions>
78+
<execution>
79+
<id>attach-javadocs</id>
80+
<goals>
81+
<goal>jar</goal>
82+
</goals>
83+
</execution>
84+
</executions>
85+
</plugin>
86+
<plugin>
87+
<groupId>org.apache.maven.plugins</groupId>
88+
<artifactId>maven-gpg-plugin</artifactId>
89+
<version>1.5</version>
90+
<executions>
91+
<execution>
92+
<id>sign-artifacts</id>
93+
<phase>verify</phase>
94+
<goals>
95+
<goal>sign</goal>
96+
</goals>
97+
<configuration>
98+
<keyname>97ED25C2</keyname>
99+
</configuration>
100+
</execution>
101+
</executions>
102+
</plugin>
103+
<plugin>
104+
<groupId>org.sonatype.plugins</groupId>
105+
<artifactId>nexus-staging-maven-plugin</artifactId>
106+
<version>1.6.3</version>
107+
<extensions>true</extensions>
108+
<configuration>
109+
<serverId>ossrh</serverId>
110+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
111+
<autoReleaseAfterClose>false</autoReleaseAfterClose>
112+
</configuration>
113+
</plugin>
114+
</plugins>
115+
</build>
116+
<dependencies>
117+
<dependency>
118+
<groupId>com.google.android</groupId>
119+
<artifactId>android</artifactId>
120+
<version>4.0.1.2</version>
121+
<scope>provided</scope>
122+
</dependency>
123+
</dependencies>
124+
</project>

0 commit comments

Comments
 (0)