Skip to content

Commit

Permalink
Merge pull request #817 from reflex-frp/release/1.0.0.0
Browse files Browse the repository at this point in the history
Release/1.0.0.0
  • Loading branch information
ali-abrar authored May 19, 2023
2 parents 123a6f4 + 676552e commit badf317
Show file tree
Hide file tree
Showing 117 changed files with 1,563 additions and 1,150 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ jobs:
os: ['ubuntu-latest', 'macos-latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v12
uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-22.05
extra_nix_config: |
trusted-public-keys = ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=
substituters = https://cache.nixos.org/ https://nixcache.reflex-frp.org
- name: try-reflex
run: nix-build -A tryReflexShell --substituters https://nixcache.reflex-frp.org --trusted-public-keys ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=
run: nix-build -A tryReflexShell
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Make sure the project builds and that the tests pass! This will generally also b
To test your changes:
1. Fork, then clone the repo:
```bash
git clone git@github.com:your-username/reflex.git
git clone git@github.com:your-username/reflex-platform.git
```

2. Make sure the tests pass:
Expand Down
71 changes: 71 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,77 @@

This project's release branch is `master`. This log is written from the perspective of the release branch: when changes hit `master`, they are considered released.

## v1.0.0.0

* Nix
* Update pinned nixpkgs to nixpkgs-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`
* Android: Drop aarch32/armv7/armeabi support for 8.10.7 due to upstream ghc bugs ([!17973](https://gitlab.haskell.org/ghc/ghc/-/issues/17973))
* We will continue to support GHC 8.6.5 Android 32-bit
* This means 32-bit android devices are no longer supported on 8.10.7 and up
* iOS: Make it possible to specify the path to the app's icons and splash images. See `iconPath` in `ios/default.nix`
* iOS: Make it possible to build a TestFlight/App Store ready ipa. See `isRelease` in `ios/default.nix`
* iOS: Include Assets Archive if present at `iconPath`
* 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.
* GHC 8.10 support is complete, with the remaining profiling builds
that worked for 8.6 (everything but GHCJS's) now also working for 8.10.
* *Breaking Change*: The `javaSources` argument of `android/default.nix` is now
a function that takes the default sources as arguments instead of a list that
is always appended to the default sources. It is now possible to override the
default java sources. See the documentation [here](android/default.nix).
* 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.
* GHC 8.10 support is complete, with the remaining profiling builds that worked for 8.6 (everything but GHCJS's) now also working for 8.10.

* GHCJS 8.6 no longer uses older versions of some libraries with "text JS-string"
* `dlist`
* `ghcjs-base`
* `ghcjs-base`
* `primitive`
* `vector`
* hashable
Instead it uses the same versions as everything else.

* Haskell Library Updates
* Intentional bumps:
* all-cabal-hashes "Update from Hackage at 2022-06-29T01:24:32Z"
* dependent-monoidal-map to 0.1.1.3
* dependent-sum-aeson-orphans to 0.3.1.1
* dependent-sum-template to 0.1.1.0
* monoidal-containers to 0.6.2.0
* patch to 0.0.8.0
* reflex to 0.8.2.2
* reflex-dom-core to 0.7.0.2
* reflex-ghci to 0.1.5.4
* reflex-process to 0.3.1.2
* reflex-vty to 0.3.0.0
* some to 1.0.2
* vessel to 0.3.0.0
* witherable to 0.4.2
* Prerequisite bumps:
* OneTuple 0.3.1
* QuickCheck 2.14.1
* aeson 1.5.4.1
* base-orphans 0.8.6
* bifunctors 5.5.11
* commutative-semigroups (newly added at 0.1.0.0)
* comonad 5.0.8
* generic-deriving 1.14.1
* hashable 1.3.5.0
* index-traversable 0.1.2
* invariant 0.5.5
* lens 4.19.2
* microlens-th 0.4.3.10
* quickcheck-instances 0.3.27
* splitmix 0.1.0.4
* strict 0.4.0.1
* tagged 0.8.6.1
* th-abstraction 0.4.3.0
* th-lift 0.8.2
* time-compat 1.9.4

## v0.9.2.0

* Bump
Expand Down
6 changes: 3 additions & 3 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 Expand Up @@ -105,7 +105,7 @@ When you are completely done with a sub-repository, you can remove it
using `hack-off`:

```
~/reflex-platform/scripts/hack-add haskell-overlays/reflex-packages/dep/reflex
~/reflex-platform/scripts/hack-off haskell-overlays/reflex-packages/dep/reflex
```

This will remove the repository and replace the `default.nix` and
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ If you're using one of these platforms, please take a look at notes before you b

If you encounter any problems that may be specific to your platform, please submit an issue or pull request so that we can add a note for future users.

#### Windows

Reflex Platform will not work on Windows because we rely on [Nix](https://nixos.org/nix/) to define and construct our environment. You may have some success by using the Windows Subsystem for Linux, but we do not provide support for this platform.

### Memory Requirements

GHCJS uses a lot of memory during compilation.
Expand Down
18 changes: 12 additions & 6 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 All @@ -100,10 +104,12 @@ stdenv.mkDerivation ({

installPhase = ''
mkdir -p $out
cp -RL build/outputs/apk/*/*.apk $out
${if gradleTask == "bundleRelease"
then "cp -RL build/outputs/bundle/release/*.aab $out"
else "cp -RL build/outputs/apk/*/*.apk $out"}
'';

meta = {
license = stdenv.lib.licenses.unfree;
license = lib.licenses.unfree;
};
} // builtins.removeAttrs args ["name" "mavenDeps"])
34 changes: 27 additions & 7 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,25 @@ 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'
compileSdkVersion 30
buildToolsVersion '30.0.2'
lintOptions {
checkReleaseBuilds false
abortOnError false
}
sourceSets {
main {
Expand All @@ -47,10 +61,16 @@ android {
jniLibs.srcDir 'lib'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "${applicationId}"
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 30
versionCode ${version.code}
versionName "${version.name}"
multiDexEnabled false
Expand Down
22 changes: 17 additions & 5 deletions android/buildIcons.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
{ runCommand, imagemagick }:
{ src }:
{ runCommand, imagemagick, lib }:
{ src ? null # Base raster image for fixed-size icons (must be a path)
, adaptiveIcon ? null
# Path to a XML file containing the adaptive icon specification (SDK
# 26 and up).
}:
let
rasterInput =
if (src == null) && (adaptiveIcon == null)
then abort "Either src or adaptiveIcon must be specified!"
else src;
in
runCommand "android-icons" {
inherit src;
buildCommand = ''
buildCommand = lib.optionalString (src != null) ''
mkdir "$out"
launcherIconSize() {
Expand All @@ -20,8 +29,11 @@ runCommand "android-icons" {
for x in l m tv h xh xxh xxxh ; do
local dir="$out/drawable-''${x}dpi"
mkdir "$dir"
convert -resize "$(launcherIconSize "$x")" -flatten "$src" "$dir/ic_launcher.png"
convert -resize "$(launcherIconSize "$x")" -flatten "${rasterInput}" "$dir/ic_launcher.png"
done
'' + lib.optionalString (adaptiveIcon != null) ''
mkdir -p "$out/mipmap-anydpi-v26/"
cp "${adaptiveIcon}" "$out/mipmap-anydpi-v26/ic_launcher.xml"
'';
nativeBuildInputs = [
imagemagick
Expand Down
10 changes: 8 additions & 2 deletions android/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,14 @@ in rec {
# You need to patch soname in make files of libraries to link against
# unversioned libraries.

, javaSources ? []
# A list of additional Java source directories to include in the APK build
, javaSources ? (androidActivitySrc: mainWidgetSrc: [ androidActivitySrc mainWidgetSrc ])
# A function that is used to build the list of android source files. The
# arguments to this function are:
# * The default android-activity java source tree (from the [android-activity package](https://hackage.haskell.org/package/android-activity))
# * The default "main widget" java source tree (from [reflex-dom](https://github.com/reflex-frp/reflex-dom/blob/develop/reflex-dom/java/org/reflexfrp/reflexdom/MainWidget.java))
# Those arguments can be selectively ignored and replaced with alternate
# implementations. Additional Java source directories can also be added
# to the list for inclusion in the APK build

, universalApk ? true
# Set this to false to build one APK per target platform. This will
Expand Down
Loading

0 comments on commit badf317

Please sign in to comment.