Skip to content

Commit

Permalink
update various settings for Android and Gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
bostick committed May 26, 2023
1 parent 4531b38 commit f656868
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
25 changes: 20 additions & 5 deletions pkg/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 31
compileSdkVersion 33
defaultConfig {
minSdkVersion 21
targetSdkVersion 31
targetSdkVersion 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags ""
version '3.22.1'
arguments "-DZTS_ENABLE_JAVA=ON"
}
}
ndk {
Expand All @@ -28,15 +30,28 @@ android {
externalNativeBuild {
cmake {
path "../../../CMakeLists.txt"
version '3.22.1'
}
}

ndkVersion '25.1.8937393'

namespace 'com.example.zerotier'

sourceSets {
main {
java {
srcDir 'src/main/java'
srcDir '../../../src/bindings/java'
}
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
3 changes: 1 addition & 2 deletions pkg/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.zerotier">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
6 changes: 3 additions & 3 deletions pkg/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ buildscript {

repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:7.3.1'


// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -18,7 +18,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down

0 comments on commit f656868

Please sign in to comment.