Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/nixpkgs-21.05' into aliao/mobile…
Browse files Browse the repository at this point in the history
…-8_10-wip
  • Loading branch information
ali-abrar committed Jul 18, 2022
2 parents 315b211 + d574c2f commit 7b14c43
Show file tree
Hide file tree
Showing 40 changed files with 675 additions and 600 deletions.
13 changes: 13 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ This project's release branch is `master`. This log is written from the perspect

## Unreleased

* Bump
* Nixpkgs to 21.05
* Android: Use gradle v7 and build-tools 30.0.2 by default

* Android: Automatically set build tool version in gradle.properties based on the configured `buildToolsVersions`

## Unreleased

* Fix SIGBUS crashes on armv7a due unaligned writes ([!774](https://github.com/reflex-frp/reflex-platform/pull/774))
* Always use GHC 8.10.7, not GHC 8.10.4, for GHC 8.10.
Previously we were using mixed GHC 8.10 versions to avoid issues.
Expand Down Expand Up @@ -32,6 +40,11 @@ This project's release branch is `master`. This log is written from the perspect
* all-cabal-hashes "Update from Hackage at 2022-01-20T19:38:07Z"
* dependent-sum-template to 0.1.1.0
* some to 1.0.2
* monoidal-containers to 0.6.2.0
* witherable to 0.4.2
* patch to 0.0.7.0
* reflex-vty to 0.2.0.1
* reflex-ghci to 0.1.5.3

Prerequisite bumps:

Expand Down
4 changes: 2 additions & 2 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Many different platform are provided for you. A partial list of
possible platforms include:

- ghc
- ghc8_6
- ghc8_10
- ghcjs
- ghcjs8_6
- ghcjs8_10

In addition, instead of specifying the name of the platform, you can
specify a path to a Nix expression file representing a Haskell
Expand Down
14 changes: 9 additions & 5 deletions android/build-gradle-app.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ stdenv, androidenv, jdk, gnumake, gawk, file
{ stdenv, lib, androidenv, jdk, gnumake, gawk, file
, which, gradle, fetchurl, buildEnv, runCommand }:

args@{ name, src, platformVersions ? [ "8" ]
, buildToolsVersions ? [ "28.0.3" ]
, buildToolsVersions ? [ "30.0.2" ]
, useGoogleAPIs ? false, useGooglePlayServices ? false
, release ? false, keyStore ? null, keyAlias ? null
, keyStorePassword ? null, keyAliasPassword ? null
Expand All @@ -16,7 +16,7 @@ assert release -> keyAliasPassword != null;
assert acceptAndroidSdkLicenses;

let
inherit (stdenv.lib) optionalString optional;
inherit (lib) optionalString optional;

m2install = { repo, version, artifactId, groupId
, jarSha256, pomSha256, aarSha256, suffix ? ""
Expand Down Expand Up @@ -48,6 +48,7 @@ let
'');
androidsdkComposition = androidenv.composeAndroidPackages {
inherit platformVersions useGoogleAPIs buildToolsVersions;
includeNDK = true;
includeExtras = [ "extras;android;m2repository" ]
++ optional useGooglePlayServices "extras;google;google_play_services";
};
Expand All @@ -59,7 +60,7 @@ stdenv.mkDerivation ({
ANDROID_HOME = "${androidsdkComposition.androidsdk}/libexec";
ANDROID_NDK_HOME = "${androidsdkComposition.ndk-bundle}/libexec/android-sdk/ndk-bundle";

buildInputs = [ jdk gradle ] ++ buildInputs ++ stdenv.lib.optional useNDK [ androidsdkComposition.ndk-bundle gnumake gawk file which ];
buildInputs = [ jdk gradle ] ++ buildInputs ++ lib.optional useNDK [ androidsdkComposition.ndk-bundle gnumake gawk file which ];

DEPENDENCIES = buildEnv { name = "${name}-maven-deps";
paths = map m2install mavenDeps;
Expand All @@ -74,6 +75,9 @@ stdenv.mkDerivation ({
echo "RELEASE_KEY_PASSWORD=${keyAliasPassword}"
) >> gradle.properties
''}
${optionalString (builtins.length buildToolsVersions > 0) ''
echo "android.aapt2FromMavenOverride=local_sdk/android-sdk/build-tools/${builtins.head buildToolsVersions}/aapt2" >> gradle.properties
''}
buildDir=`pwd`
cp -rL $ANDROID_HOME $buildDir/local_sdk
chmod -R 755 local_sdk
Expand Down Expand Up @@ -106,6 +110,6 @@ stdenv.mkDerivation ({
'';

meta = {
license = stdenv.lib.licenses.unfree;
license = lib.licenses.unfree;
};
} // builtins.removeAttrs args ["name" "mavenDeps"])
19 changes: 14 additions & 5 deletions android/build.gradle.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
''
buildscript {
repositories {
mavenLocal()
mavenLocal {
metadataSources {
mavenPom()
artifact()
}
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.android.tools.lint:lint:26.4.2'
classpath 'com.android.tools.build:gradle:4.2.2'
${googleServicesClasspath}
}
}
Expand All @@ -28,15 +32,20 @@ task proguard(type: proguard.gradle.ProGuardTask) {
allprojects {
repositories {
mavenLocal()
mavenLocal {
metadataSources {
mavenPom()
artifact()
}
}
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion '28.0.3'
buildToolsVersion '30.0.2'
sourceSets {
main {
Expand Down
Loading

0 comments on commit 7b14c43

Please sign in to comment.