Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 1e90ffe

Browse files
committed
restore removed files
1 parent 0cae3ed commit 1e90ffe

File tree

135 files changed

+9532
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+9532
-5
lines changed

android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

android/build.gradle

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
buildscript {
2+
repositories {
3+
jcenter()
4+
google()
5+
}
6+
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:3.1.0'
9+
}
10+
}
11+
12+
apply plugin: 'com.android.library'
13+
apply plugin: 'maven'
14+
apply plugin: 'signing'
15+
16+
archivesBaseName = "curve25519-android"
17+
version = version_number
18+
group = group_info
19+
20+
android {
21+
compileSdkVersion 21
22+
buildToolsVersion "21.1.2"
23+
24+
sourceSets {
25+
main {
26+
jniLibs.srcDirs = ['libs']
27+
}
28+
}
29+
30+
libraryVariants.all { variant ->
31+
variant.outputs.each { output ->
32+
def outputFile = output.outputFile
33+
if (outputFile != null && outputFile.name.endsWith('.aar')) {
34+
def fileName = "${archivesBaseName}-${version}.aar"
35+
output.outputFile = new File(outputFile.parent, fileName)
36+
}
37+
}
38+
}
39+
}
40+
41+
repositories {
42+
mavenCentral()
43+
}
44+
45+
dependencies {
46+
compile project(':java')
47+
48+
androidTestCompile (project(":tests")) {
49+
exclude module: 'junit'
50+
}
51+
}
52+
53+
signing {
54+
required { has("release") && gradle.taskGraph.hasTask("uploadArchives") }
55+
sign configurations.archives
56+
}
57+
58+
uploadArchives {
59+
configuration = configurations.archives
60+
repositories.mavenDeployer {
61+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
62+
63+
repository(url: sonatypeRepo) {
64+
authentication(userName: whisperSonatypeUsername, password: whisperSonatypePassword)
65+
}
66+
67+
pom.project {
68+
name 'curve25519-android'
69+
packaging 'aar'
70+
description 'Curve25519 library for Android'
71+
url 'https://github.com/WhisperSystems/curve25519-java'
72+
73+
scm {
74+
url 'scm:git@github.com:WhisperSystems/curve25519-java.git'
75+
connection 'scm:git@github.com:WhisperSystems/curve25519-java.git'
76+
developerConnection 'scm:git@github.com:WhisperSystems/curve25519-java.git'
77+
}
78+
79+
licenses {
80+
license {
81+
name 'GPLv3'
82+
url 'https://www.gnu.org/licenses/gpl-3.0.txt'
83+
distribution 'repo'
84+
}
85+
}
86+
87+
developers {
88+
developer {
89+
name 'Trevor Perrin'
90+
name 'Moxie Marlinspike'
91+
}
92+
}
93+
}
94+
}
95+
}
96+
97+
task installArchives(type: Upload) {
98+
description "Installs the artifacts to the local Maven repository."
99+
configuration = configurations['archives']
100+
repositories {
101+
mavenDeployer {
102+
repository url: "file://${System.properties['user.home']}/.m2/repository"
103+
}
104+
}
105+
}
106+

android/jni/Android.mk

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
LOCAL_PATH:= $(call my-dir)
2+
3+
include $(CLEAR_VARS)
4+
5+
LOCAL_MODULE := libcurve25519-donna
6+
LOCAL_SRC_FILES := curve25519-donna.c
7+
8+
include $(BUILD_STATIC_LIBRARY)
9+
10+
include $(CLEAR_VARS)
11+
12+
LOCAL_MODULE := libcurve25519-ref10
13+
LOCAL_SRC_FILES := $(wildcard ed25519/*.c) $(wildcard ed25519/additions/*.c) \
14+
$(wildcard ed25519/additions/generalized/*.c) $(wildcard ed25519/nacl_sha512/*.c) \
15+
ed25519/tests/internal_fast_tests.c
16+
17+
LOCAL_C_INCLUDES := ed25519/nacl_includes ed25519/additions ed25519/additions/generalized ed25519/tests ed25519/sha512 ed25519
18+
19+
include $(BUILD_STATIC_LIBRARY)
20+
21+
include $(CLEAR_VARS)
22+
23+
LOCAL_MODULE := libcurve25519
24+
LOCAL_SRC_FILES := curve25519-jni.c
25+
LOCAL_C_INCLUDES := ed25519/additions ed25519/additions/generalized ed25519/tests
26+
27+
LOCAL_STATIC_LIBRARIES := libcurve25519-donna libcurve25519-ref10
28+
29+
include $(BUILD_SHARED_LIBRARY)
30+

android/jni/Application.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
APP_ABI := armeabi armeabi-v7a x86 mips arm64-v8a x86_64

0 commit comments

Comments
 (0)