diff --git a/README.md b/README.md index 4ffe3aca9..eca22dc7b 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,4 @@ To build the mobile app, along with python, you will need - The Java JDK (development kit - the runtime JRE is not enough) - The Android SDK -Run `build.py mobile` to build IITC Mobile in debug mode. - -Note that part of the build.py process includes copying the IITC script files into the `mobile/res` subfolder. -If this isn't done (e.g. you build IITC Mobile directly from Eclipse) you will end up with a broken build. +Run `build.py mobile` to build IITC Mobile in debug mode. \ No newline at end of file diff --git a/build.py b/build.py index f77e51fc0..c3ac6596b 100755 --- a/build.py +++ b/build.py @@ -295,7 +295,7 @@ def saveScriptAndMeta(script,ourDir,filename,oldDir=None): print ("Error: mobile app failed to build. gradlew returned %d" % retcode) exit(1) # ant may return 256, but python seems to allow only values <256 else: - shutil.copy("mobile/app/build/outputs/apk/app-%s.apk" % buildMobile, os.path.join(outDir,"IITC_Mobile-%s.apk" % buildMobile) ) + shutil.copy("mobile/app/build/outputs/apk/%s/app-%s.apk" % (buildMobile, buildMobile), os.path.join(outDir,"IITC_Mobile-%s.apk" % buildMobile) ) # run any postBuild commands diff --git a/mobile/.gitignore b/mobile/.gitignore index e8a2a783d..4e4679147 100644 --- a/mobile/.gitignore +++ b/mobile/.gitignore @@ -32,6 +32,7 @@ local.properties *.iws .idea/workspace.xml .idea/tasks.xml +.idea/misc.xml # Proguard logs proguard_logs/ diff --git a/mobile/app/build.gradle b/mobile/app/build.gradle index bceae8f11..765b2af70 100644 --- a/mobile/app/build.gradle +++ b/mobile/app/build.gradle @@ -1,15 +1,15 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 21 - buildToolsVersion "21.1.1" + compileSdkVersion 28 + buildToolsVersion "28.0.3" defaultConfig { applicationId "com.cradle.iitc_mobile" minSdkVersion 14 - targetSdkVersion 21 + targetSdkVersion 28 } buildTypes { release { - runProguard false + minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } @@ -18,7 +18,22 @@ android { assets.srcDirs = ['../assets'] } } + useLibrary 'org.apache.http.legacy' } + dependencies { - compile 'com.android.support:support-v4:19.1.0' -} \ No newline at end of file + implementation 'com.android.support:appcompat-v7:28.+' + implementation fileTree(dir: 'libs', include: ['*.jar']) +} + +task copyUserscripts(type: Copy) + +copyUserscripts { + description = 'Updating prebuilt plugins' + from '../assets' + into 'src/main/assets' + include('*') + include('**/*') +} + +preBuild.dependsOn copyUserscripts \ No newline at end of file diff --git a/mobile/build.gradle b/mobile/build.gradle index a51686871..121127f9d 100644 --- a/mobile/build.gradle +++ b/mobile/build.gradle @@ -1,14 +1,16 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { + google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:0.12.2' + classpath 'com.android.tools.build:gradle:3.2.1' } } allprojects { repositories { + google() jcenter() } } diff --git a/mobile/gradle/wrapper/gradle-wrapper.properties b/mobile/gradle/wrapper/gradle-wrapper.properties index 1e61d1fd3..590bb1906 100644 --- a/mobile/gradle/wrapper/gradle-wrapper.properties +++ b/mobile/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +