Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,13 @@ def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion 28

defaultConfig {
applicationId "com.nightwatch"
minSdkVersion 16
targetSdkVersion 22
versionCode 28
versionCode 55
versionName "1.0.0"
ndk {
abiFilters "armeabi-v7a", "x86"
Expand Down Expand Up @@ -143,10 +142,10 @@ android {
}

dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile project(':react-native-image-picker')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:23.0.1"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation project(':react-native-image-picker')
}

// Run this once to be able to run the application with BUCK
Expand Down
5 changes: 1 addition & 4 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="22"
tools:overrideLibrary="com.reactnative.imagepicker" />
<uses-sdk tools:overrideLibrary="com.reactnative.imagepicker" />

<application
android:name=".MainApplication"
Expand Down
4 changes: 3 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:3.3.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -20,5 +21,6 @@ allprojects {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
google()
}
}
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Wed Feb 27 12:17:22 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
39 changes: 11 additions & 28 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ let srcDir = __SOURCE_DIRECTORY__ </> "src"

let testDir = __SOURCE_DIRECTORY__ </> "tests" </> "IntegrationTests"

let dotnetcliVersion = "2.0.0"
let dotnetcliVersion = DotNetCli.GetDotNetSDKVersionFromGlobalJson()

let mutable dotnetExePath = "dotnet"

Expand Down Expand Up @@ -144,6 +144,12 @@ FinalTarget "CloseAndroid" (fun _ ->

Target "InstallDotNetCore" (fun _ ->
dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion
let fi = FileInfo dotnetExePath
let SEPARATOR = if isWindows then ";" else ":"
Environment.SetEnvironmentVariable(
"PATH",
fi.Directory.FullName + SEPARATOR + System.Environment.GetEnvironmentVariable "PATH",
EnvironmentVariableTarget.Process)
)

Target "Restore" (fun _ ->
Expand Down Expand Up @@ -244,13 +250,7 @@ Target "PrepareRelease" (fun _ ->
Target "CompileForTest" (fun _ ->
ActivateFinalTarget "KillProcess"

let result =
ExecProcess (fun info ->
info.FileName <- dotnetExePath
info.WorkingDirectory <- srcDir
info.Arguments <- " fable npm-run compile-for-test") TimeSpan.MaxValue

if result <> 0 then failwith "fable shut down. Please check logs above"
run yarnTool "run fable-splitter -c splitter.config.js --define TEST" srcDir
)

Target "AssembleForTest" (fun _ ->
Expand All @@ -260,12 +260,7 @@ Target "AssembleForTest" (fun _ ->
Target "BuildRelease" (fun _ ->
ActivateFinalTarget "KillProcess"

let result =
ExecProcess (fun info ->
info.FileName <- dotnetExePath
info.WorkingDirectory <- srcDir
info.Arguments <- " fable npm-run build") TimeSpan.MaxValue
if result <> 0 then failwith "fable shut down. Please check logs above"
run yarnTool "run fable-splitter -c splitter.config.js --define RELEASE" srcDir
run gradleTool "assembleRelease --console plain" "android"

let outFile = "android" </> "app" </> "build" </> "outputs" </> "apk" </> "app-release.apk"
Expand All @@ -275,20 +270,8 @@ Target "BuildRelease" (fun _ ->
)

Target "Debug" (fun _ ->
let result =
ExecProcess (fun info ->
info.FileName <- dotnetExePath
info.WorkingDirectory <- srcDir
info.Arguments <- " fable npm-run cold-start") TimeSpan.MaxValue
if result <> 0 then failwith "fable shut down."

let dotnetwatch = async {
let result =
ExecProcess (fun info ->
info.FileName <- dotnetExePath
info.WorkingDirectory <- srcDir
info.Arguments <- " fable npm-run start") TimeSpan.MaxValue
if result <> 0 then failwith "fable shut down." }
run yarnTool "run fable-splitter -c splitter.config.js --define DEBUG" srcDir
let dotnetwatch = async { run yarnTool "run fable-splitter -c splitter.config.js -w --define DEBUG" srcDir }

let reactNativeTool = async { run reactNativeTool "run-android" "" }

Expand Down
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "2.1.402"
}
}
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@
"cold-start": "fable-splitter -c splitter.config.js --define DEBUG"
},
"dependencies": {
"buffer": "5.0.8",
"core-js": "2.5.3",
"react": "16.2.0",
"react-native": "0.54.2",
"react-native-image-picker": "0.26.7"
"buffer": "5.2.1",
"core-js": "2.6.5",
"react": "16.6.3",
"react-native": "0.58.5",
"react-native-image-picker": "0.28.0"
},
"devDependencies": {
"appium": "1.7.2",
"babel-core": "6.26.0",
"fable-splitter": "0.1.21"
"metro-react-native-babel-preset": "0.52.0",
"appium": "^1.11.1",
"babel-core": "7.0.0-bridge.0",
"fable-compiler": "next",
"fable-splitter": "2.1.5"
}
}
10 changes: 4 additions & 6 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ nuget Fable.Core

nuget Fable.PowerPack
nuget Fable.React
nuget Fable.React.Native
nuget Fable.React.Native prerelease
nuget Fable.Elmish
nuget Fable.Elmish.React
nuget Fable.Elmish.HMR
nuget Fable.Elmish.HMR 3.2.0
nuget Fable.Import.Browser

clitool dotnet-fable

group Test

generate_load_scripts: true
Expand All @@ -24,5 +22,5 @@ group Test

group Build
source https://nuget.org/api/v2
nuget FAKE

nuget FAKE < 5
Loading