Skip to content

Commit 29db9ae

Browse files
committed
ANDROID: upgrade to use android studio
1 parent c54179d commit 29db9ae

21 files changed

+97
-112
lines changed

ide/android/.classpath

-9
This file was deleted.

ide/android/.project

-33
This file was deleted.

ide/android/build.xml

-50
This file was deleted.

ide/android/project.properties

-14
This file was deleted.

src/platform/android/app/build.gradle

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
// app can use the API features included in this API level and lower.
5+
compileSdkVersion 28
6+
7+
// can override some attributes in main/AndroidManifest.xml
8+
defaultConfig {
9+
applicationId 'net.sourceforge.smallbasic'
10+
minSdkVersion 15
11+
targetSdkVersion 28
12+
versionCode 27
13+
versionName "0.12.13"
14+
resConfigs "en"
15+
}
16+
17+
signingConfigs {
18+
release {
19+
Properties properties = new Properties()
20+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
21+
storeFile file(properties.getProperty('storeFile'))
22+
keyAlias properties.getProperty('keyAlias')
23+
storePassword properties.getProperty('storePassword')
24+
keyPassword properties.getProperty('keyPassword')
25+
}
26+
}
27+
28+
buildTypes {
29+
debug {
30+
buildConfigField "boolean", "DEBUG_VIEW", "true"
31+
buildConfigField "java.util.Date", "BUILD_TIME", "new java.util.Date(" + System.currentTimeMillis() + "L)"
32+
}
33+
release {
34+
buildConfigField "boolean", "DEBUG_VIEW", "false"
35+
buildConfigField "java.util.Date", "BUILD_TIME", "new java.util.Date(" + System.currentTimeMillis() + "L)"
36+
shrinkResources true
37+
minifyEnabled true
38+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-android.txt'
39+
signingConfig signingConfigs.release
40+
}
41+
}
42+
externalNativeBuild {
43+
ndkBuild {
44+
path '../jni/Android.mk'
45+
}
46+
}
47+
}
48+
49+
dependencies {
50+
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.1'
51+
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.1'
52+
testImplementation 'junit:junit:4.12'
53+
}

ide/android/AndroidManifest.xml renamed to src/platform/android/app/src/main/AndroidManifest.xml

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="net.sourceforge.smallbasic"
4-
android:installLocation="preferExternal"
5-
android:versionCode="27"
6-
android:versionName="0.12.13">
7-
<uses-sdk android:minSdkVersion="15"/>
8-
3+
package="net.sourceforge.smallbasic">
94
<!-- support large + xlarge screens to avoid compatibility mode -->
105
<supports-screens android:largeScreens="true" />
116
<supports-screens android:xlargeScreens="true" />

src/platform/android/build.gradle

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
buildscript {
2+
// configure the repositories and dependencies for Gradle itself
3+
repositories {
4+
google()
5+
jcenter()
6+
}
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:3.1.3'
9+
classpath "com.github.ben-manes:gradle-versions-plugin:0.20.0"
10+
}
11+
}
12+
13+
allprojects {
14+
repositories {
15+
google()
16+
jcenter()
17+
}
18+
}
19+
20+
apply plugin: 'idea'
21+
apply plugin: "com.github.ben-manes.versions"
22+
23+
task clean(type: Delete) {
24+
delete rootProject.buildDir
25+
}
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Project-wide Gradle settings.
2+
3+
# IDE (e.g. Android Studio) users:
4+
# Gradle settings configured through the IDE *will override*
5+
# any settings specified in this file.
6+
7+
# For more details on how to configure your build environment visit
8+
# http://www.gradle.org/docs/current/userguide/build_environment.html
9+
10+
# Specifies the JVM arguments used for the daemon process.
11+
# The setting is particularly useful for tweaking memory settings.
12+
org.gradle.jvmargs=-Xmx1536m
13+
14+
# When configured, Gradle will run in incubating parallel mode.
15+
# This option should only be used with decoupled projects. More details, visit
16+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17+
# org.gradle.parallel=true

src/platform/android/settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include ':app'

0 commit comments

Comments
 (0)