Explore all Form open source software, libraries, packages, source code, cloud functions and APIs.

Popular New Releases in Form

react-hook-form

Version 7.30.0

black

22.3.0

redux-form

v8.3.8

simple_form

formily

Release 🚀 - v2.0.18

Popular Libraries in Form

react-hook-form

by react-hook-form doticontypescriptdoticon

star image 27671 doticonMIT

📋 React Hooks for form state management and validation (Web + React Native)

black

by psf doticonpythondoticon

star image 26980 doticonMIT

The uncompromising Python code formatter

redux-form

by redux-form doticonjavascriptdoticon

star image 12596 doticonMIT

A Higher Order Component using react-redux to keep form state in a Redux store

simple_form

by heartcombo doticonrubydoticon

star image 7914 doticonMIT

Forms made easy for Rails! It's tied to a simple DSL, with no opinion on markup.

formily

by alibaba doticontypescriptdoticon

star image 7568 doticonMIT

Alibaba Group Unified Form Solution -- Support React/ReactNative/Vue2/Vue3

react-final-form

by final-form doticonjavascriptdoticon

star image 6884 doticonMIT

🏁 High performance subscription-based form state management for React

uno

by unoplatform doticoncsharpdoticon

star image 6427 doticonNOASSERTION

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.

refit

by reactiveui doticoncsharpdoticon

star image 5880 doticonMIT

The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.

Xamarin.Forms

by xamarin doticoncsharpdoticon

star image 5556 doticonNOASSERTION

Xamarin.Forms Official Home

Trending New libraries in Form

tailwindcss-forms

by tailwindlabs doticonhtmldoticon

star image 2005 doticonMIT

LiveCharts2

by beto-rodriguez doticoncsharpdoticon

star image 1187 doticonMIT

Simple, flexible, interactive & powerful charts, maps and gauges for .Net, LiveCharts2 can now practically run everywhere WPF, WinForms, Xamarin, Avalonia, WinUI, UWP, Blazor-wasm, MAUI

WeatherTwentyOne

by davidortinau doticoncsharpdoticon

star image 771 doticonMIT

reactive-forms

by ngneat doticontypescriptdoticon

star image 538 doticon

(Angular Reactive) Forms with Benefits 😉

doomcaptcha

by vivirenremoto doticonhtmldoticon

star image 508 doticonGPL-3.0

Captchas don't have to be boring

Microsoft.Maui.Graphics

by dotnet doticoncsharpdoticon

star image 456 doticonMIT

Maui

by CommunityToolkit doticoncsharpdoticon

star image 447 doticonMIT

The .NET MAUI Community Toolkit is a community-created library that contains .NET MAUI Extensions, Advanced UI/UX Controls, Effects, and Behaviors to help make your life as a .NET MAUI developer easier

WPF-Xamarin-Blazor-Examples

by HenJigg doticoncsharpdoticon

star image 396 doticonMIT

Example projects based on WPF, Xamarin, Blazor and other platforms

devtools

by react-hook-form doticontypescriptdoticon

star image 391 doticon

📋 DevTools to help debug forms.

Top Authors in Form

1

jsuarezruiz

72 Libraries

star icon3340

2

DevExpress-Examples

55 Libraries

star icon182

3

MicrosoftDocs

49 Libraries

star icon608

4

jamesmontemagno

41 Libraries

star icon4537

5

brminnick

36 Libraries

star icon662

6

jfversluis

33 Libraries

star icon345

7

microsoft

32 Libraries

star icon7607

8

CrossGeeks

31 Libraries

star icon797

9

kphillpotts

29 Libraries

star icon1080

10

xamarin

28 Libraries

star icon17739

1

72 Libraries

star icon3340

2

55 Libraries

star icon182

3

49 Libraries

star icon608

4

41 Libraries

star icon4537

5

36 Libraries

star icon662

6

33 Libraries

star icon345

7

32 Libraries

star icon7607

8

31 Libraries

star icon797

9

29 Libraries

star icon1080

10

28 Libraries

star icon17739

Trending Kits in Form

React lets you render various types of buttons that enable different use cases, positions, styles, and so on. These buttons let users take action, make choices, and select their favorite option with one tap. The Button component in ReactJS can be used for a variety of functions and through different approaches. It improves the user experience and lets the developer create React applications and install modules with different options and components. Buttons are one of the most useful styling components that let you render whatever option you like. React Bootstrap also takes care of proper ARIA roles. Adding buttons to your web app makes it more immersive and interactive, along with integrating several menu actions that would not have been possible otherwise. Below are our 23 best JavaScript React button libraries that are open source in 2022. react-awesome-button - React button component; paypal-checkout-components - Javascript Integration for PayPal Button and PayPal Checkout; vanilla-back-to-top - Simple and smooth Back To Top button.

Trending Discussions on Form

Instead change the require of index.js, to a dynamic import() which is available in all CommonJS modules

AngularFireModule and AngularFireDatabaseModule not being found in @angular/fire

Error: MainActivity must extend android.app.Activity [Instantiatable]

The unauthenticated git protocol on port 9418 is no longer supported

Filter a dictionary of lists

android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify

React-hook-form build problem when upgrading nextjs to version 12

Why is SFINAE for one of the std::basic_string constructors so restrictive?

Tailwind V3 causing TypeError: Cannot read property '500' of undefined

How can I efficiently calculate a quadratic form in Julia?

QUESTION

Instead change the require of index.js, to a dynamic import() which is available in all CommonJS modules

Asked 2022-Apr-05 at 06:25

Trying to work with node/javascript/nfts, I am a noob and followed along a tutorial, but I get this error:

1error [ERR_REQUIRE_ESM]: require() of ES Module [...] is not supported. Instead change the require of index.js [ in my file...]  to a dynamic import() which is available in all CommonJS modules
2

My understanding is that they've updated the node file, so i need a different code than that in the tutorial, but i don't know which one I'm supposed to change, where and to what. Please be as specific as you can

1error [ERR_REQUIRE_ESM]: require() of ES Module [...] is not supported. Instead change the require of index.js [ in my file...]  to a dynamic import() which is available in all CommonJS modules
2const FormData = require('form-data');
3const fetch = require('node-fetch');
4const path = require("path")
5const basePath = process.cwd();
6const fs = require("fs");
7
8fs.readdirSync(`${basePath}/build/images`).foreach(file).forEach(file => {
9    const formData = new FormData();
10    const fileStream = fs.createReadStream(`${basePath}/build/images/${file}`);
11    formData.append('file',fileStream);
12
13    let url = 'https://api.nftport.xyz/v0/files';
14
15    let options = {
16      method: 'POST',
17      headers: {
18        Authorization: '[...]',
19      },
20      body: formData
21    };
22    
23    fetch(url, options)
24      .then(res => res.json())
25      .then(json => {
26       const fileName = path.parse(json.file_name).name;
27       let rawdata = fs.readFileSync(`${basePath}/build/json/${fileName}.json`);
28       let metaData = JSON.parse(rawdata);
29
30       metaData.file_url = json.ipfs_url;
31
32       fs.writeFileSync(`${basePath}/build/json${fileName}.json`, JSON.stringify(metaData, null, 2));
33
34       console.log(`${json.file_name} uploaded & ${fileName}.json updated!`);
35      })
36      .catch(err => console.error('error:' + err));
37})
38
39

ANSWER

Answered 2021-Dec-31 at 10:07

It is because of the node-fetch package. As recent versions of this package only support ESM, you have to downgrade it to an older version node-fetch@2.6.1 or lower.

npm i node-fetch@2.6.1

This should solve the issue.

Source https://stackoverflow.com/questions/70541068

QUESTION

AngularFireModule and AngularFireDatabaseModule not being found in @angular/fire

Asked 2022-Apr-01 at 12:56

I am trying to implement Firebase Realtime Database into a angular project and Im getting stuck at one of the very first steps. Importing AngularFireModule and AngularFireDatabaseModule. It gives me the following error:

1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2
1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3

And here is how I am importing them:

1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3import {AngularFireModule } from '@angular/fire';
4import {AngularFireDatabaseModule} from '@angular/fire/database'
5

Am I missing something here? I have installed @angular/fire via the command

1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3import {AngularFireModule } from '@angular/fire';
4import {AngularFireDatabaseModule} from '@angular/fire/database'
5npm i firebase @angular/fire
6

and have also installed firebase tools. Here is a list of the Angular packages I currently have installed and their versions:

1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3import {AngularFireModule } from '@angular/fire';
4import {AngularFireDatabaseModule} from '@angular/fire/database'
5npm i firebase @angular/fire
6Angular CLI: 12.2.2
7Node: 14.17.4
8Package Manager: npm 6.14.14
9OS: win32 x64
10
11Angular: 12.2.3
12... animations, common, compiler, compiler-cli, core, forms
13... platform-browser, platform-browser-dynamic, router
14
15Package                         Version
16---------------------------------------------------------
17@angular-devkit/architect       0.1202.2
18@angular-devkit/build-angular   12.2.2
19@angular-devkit/core            12.2.2
20@angular-devkit/schematics      12.2.2
21@angular/cli                    12.2.2
22@angular/fire                   7.0.0
23@schematics/angular             12.2.2
24rxjs                            6.6.7
25typescript                      4.3.5
26

I do apologise if this is all excessive information but I am completely stuck as to what the issue is. Any help would be GREATLY appreciated. Right now my suspicion is that its a compatibility issue or perhaps a feature that doesnt exist anymore on the latest versions but I really dont know.

ANSWER

Answered 2021-Aug-26 at 13:20

AngularFire 7.0.0 was launched yesterday with a new API that has a lot of bundle size reduction benefits.

Instead of top level classes like AngularFireDatabase, you can now import smaller independent functions.

1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3import {AngularFireModule } from '@angular/fire';
4import {AngularFireDatabaseModule} from '@angular/fire/database'
5npm i firebase @angular/fire
6Angular CLI: 12.2.2
7Node: 14.17.4
8Package Manager: npm 6.14.14
9OS: win32 x64
10
11Angular: 12.2.3
12... animations, common, compiler, compiler-cli, core, forms
13... platform-browser, platform-browser-dynamic, router
14
15Package                         Version
16---------------------------------------------------------
17@angular-devkit/architect       0.1202.2
18@angular-devkit/build-angular   12.2.2
19@angular-devkit/core            12.2.2
20@angular-devkit/schematics      12.2.2
21@angular/cli                    12.2.2
22@angular/fire                   7.0.0
23@schematics/angular             12.2.2
24rxjs                            6.6.7
25typescript                      4.3.5
26import { list } from '@angular/fire/database';
27

The initialization process is a bit different too as it has a more flexible API for specifying configurations.

1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3import {AngularFireModule } from '@angular/fire';
4import {AngularFireDatabaseModule} from '@angular/fire/database'
5npm i firebase @angular/fire
6Angular CLI: 12.2.2
7Node: 14.17.4
8Package Manager: npm 6.14.14
9OS: win32 x64
10
11Angular: 12.2.3
12... animations, common, compiler, compiler-cli, core, forms
13... platform-browser, platform-browser-dynamic, router
14
15Package                         Version
16---------------------------------------------------------
17@angular-devkit/architect       0.1202.2
18@angular-devkit/build-angular   12.2.2
19@angular-devkit/core            12.2.2
20@angular-devkit/schematics      12.2.2
21@angular/cli                    12.2.2
22@angular/fire                   7.0.0
23@schematics/angular             12.2.2
24rxjs                            6.6.7
25typescript                      4.3.5
26import { list } from '@angular/fire/database';
27@NgModule({
28    imports: [
29        provideFirebaseApp(() => initializeApp(config)),
30        provideFirestore(() => {
31            const firestore = getFirestore();
32            connectEmulator(firestore, 'localhost', 8080);
33            enableIndexedDbPersistence(firestore);
34            return firestore;
35        }),
36        provideStorage(() => getStorage()),
37    ],
38})
39

If you want to proceed with the older API there's a compatibility layer.

1Module '"@angular/fire"' has no exported member 'AngularFireModule'.ts(2305)
2Module '"@angular/fire/database"' has no exported member 'AngularFireDatabaseModule'.
3import {AngularFireModule } from '@angular/fire';
4import {AngularFireDatabaseModule} from '@angular/fire/database'
5npm i firebase @angular/fire
6Angular CLI: 12.2.2
7Node: 14.17.4
8Package Manager: npm 6.14.14
9OS: win32 x64
10
11Angular: 12.2.3
12... animations, common, compiler, compiler-cli, core, forms
13... platform-browser, platform-browser-dynamic, router
14
15Package                         Version
16---------------------------------------------------------
17@angular-devkit/architect       0.1202.2
18@angular-devkit/build-angular   12.2.2
19@angular-devkit/core            12.2.2
20@angular-devkit/schematics      12.2.2
21@angular/cli                    12.2.2
22@angular/fire                   7.0.0
23@schematics/angular             12.2.2
24rxjs                            6.6.7
25typescript                      4.3.5
26import { list } from '@angular/fire/database';
27@NgModule({
28    imports: [
29        provideFirebaseApp(() => initializeApp(config)),
30        provideFirestore(() => {
31            const firestore = getFirestore();
32            connectEmulator(firestore, 'localhost', 8080);
33            enableIndexedDbPersistence(firestore);
34            return firestore;
35        }),
36        provideStorage(() => getStorage()),
37    ],
38})
39import { AngularFireModule} from '@angular/fire/compat'
40import { AngularFireDatabaseModule } from '@angular/fire/compat/database';
41

Source https://stackoverflow.com/questions/68939014

QUESTION

Error: MainActivity must extend android.app.Activity [Instantiatable]

Asked 2022-Mar-31 at 02:13

I tried upgrading Android Gradle Plugin from 4.2.2 to 7.0.1 using the upgrade assistant which is available in Android Studio at Tools > AGP Upgrade Assistant. The only change it made was to my project-level build.gradle file:

1buildscript {
2    repositories {
3        google()
4        mavenCentral()
5    }
6    dependencies {
7        classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8        // ...
9    }
10}
11

However, now when I run ./gradlew assemble assembleAndroidTest I get the following error:

1buildscript {
2    repositories {
3        google()
4        mavenCentral()
5    }
6    dependencies {
7        classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8        // ...
9    }
10}
11/builds/locuslabs/android-team/locuslabs-android-sdk/app/src/main/AndroidManifest.xml:21: Error: MainActivity must extend android.app.Activity [Instantiatable]
12            android:name="com.locuslabs.appsdk.MainActivity"
13                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14   Explanation for issues of type "Instantiatable":
15   Activities, services, broadcast receivers etc. registered in the manifest
16   file (or for custom views, in a layout file) must be "instantiatable" by
17   the system, which means that the class must be public, it must have an
18   empty public constructor, and if it's an inner class, it must be a static
19   inner class.
201 errors, 0 warnings
21Lint found fatal errors while assembling a release target.
22To proceed, either fix the issues identified by lint, or modify your build script as follows:
23...
24android {
25    lintOptions {
26        checkReleaseBuilds false
27        // Or, if you prefer, you can continue to check for errors in release builds,
28        // but continue the build even when errors are found:
29        abortOnError false
30    }
31}
32

My project is multi-module, but I don't suspect that as the problem since it's complaining about the application module, not a library module.

I believe my <activity> tag is well formed in my AndroidManifest.xml for my application module:

1buildscript {
2    repositories {
3        google()
4        mavenCentral()
5    }
6    dependencies {
7        classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8        // ...
9    }
10}
11/builds/locuslabs/android-team/locuslabs-android-sdk/app/src/main/AndroidManifest.xml:21: Error: MainActivity must extend android.app.Activity [Instantiatable]
12            android:name=&quot;com.locuslabs.appsdk.MainActivity&quot;
13                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14   Explanation for issues of type &quot;Instantiatable&quot;:
15   Activities, services, broadcast receivers etc. registered in the manifest
16   file (or for custom views, in a layout file) must be &quot;instantiatable&quot; by
17   the system, which means that the class must be public, it must have an
18   empty public constructor, and if it's an inner class, it must be a static
19   inner class.
201 errors, 0 warnings
21Lint found fatal errors while assembling a release target.
22To proceed, either fix the issues identified by lint, or modify your build script as follows:
23...
24android {
25    lintOptions {
26        checkReleaseBuilds false
27        // Or, if you prefer, you can continue to check for errors in release builds,
28        // but continue the build even when errors are found:
29        abortOnError false
30    }
31}
32        &lt;activity
33            android:name=&quot;com.locuslabs.appsdk.MainActivity&quot;
34            android:label=&quot;@string/app_name&quot;
35            android:windowSoftInputMode=&quot;adjustNothing&quot;&gt;
36            &lt;intent-filter&gt;
37                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
38
39                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
40            &lt;/intent-filter&gt;
41        &lt;/activity&gt;
42

Furthermore, I don't think there is anything wrong with extending AppCompatActivity instead of android.app.Activity as I'm doing in my MainActivity.kt:

1buildscript {
2    repositories {
3        google()
4        mavenCentral()
5    }
6    dependencies {
7        classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8        // ...
9    }
10}
11/builds/locuslabs/android-team/locuslabs-android-sdk/app/src/main/AndroidManifest.xml:21: Error: MainActivity must extend android.app.Activity [Instantiatable]
12            android:name=&quot;com.locuslabs.appsdk.MainActivity&quot;
13                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14   Explanation for issues of type &quot;Instantiatable&quot;:
15   Activities, services, broadcast receivers etc. registered in the manifest
16   file (or for custom views, in a layout file) must be &quot;instantiatable&quot; by
17   the system, which means that the class must be public, it must have an
18   empty public constructor, and if it's an inner class, it must be a static
19   inner class.
201 errors, 0 warnings
21Lint found fatal errors while assembling a release target.
22To proceed, either fix the issues identified by lint, or modify your build script as follows:
23...
24android {
25    lintOptions {
26        checkReleaseBuilds false
27        // Or, if you prefer, you can continue to check for errors in release builds,
28        // but continue the build even when errors are found:
29        abortOnError false
30    }
31}
32        &lt;activity
33            android:name=&quot;com.locuslabs.appsdk.MainActivity&quot;
34            android:label=&quot;@string/app_name&quot;
35            android:windowSoftInputMode=&quot;adjustNothing&quot;&gt;
36            &lt;intent-filter&gt;
37                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
38
39                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
40            &lt;/intent-filter&gt;
41        &lt;/activity&gt;
42import androidx.appcompat.app.AppCompatActivity
43
44class MainActivity : AppCompatActivity() {
45    // ...
46}
47

I'm concerned that Android Gradle Plugin 7.0.1 is not really ready for prime-time because the Android Gradle Plugin documentation still says classpath 'com.android.tools.build:gradle:4.2.0' instead of 7.0.1.

I saw that the Android Gradle Plugin 7.0.1 release notes mentioned some changes to linting but none of those changes seemed relevant to me.

I also skimmed through the Android Gradle Plugin source code to see if I could find the linting stage any identify any changes but it looked like a lot of work to find that code and do that analysis.

I searched for answers but all I could find were these two stackoverflow entries where the error was legitimate and the programmer just needed to change their code to ensure they were referencing an actual Activity:

  1. Android Studio Error: Activity must extend android.app.activity
  2. MainActivity cannot be cast to android.app.Activity

I also tried Android Gradle Plugin 7.0.0 but got the same error. Only Android Gradle Plugin 4.2.2 prevents the error.

Is this a bug in Android Gradle Plugin 7.0.1?

Update: could not disable Instantiatable

I tried to disable the Instantiatable lint error the following ways but none of them prevented the error.

First, I tried adding disable "Instantiatable" to my application-level build.gradle file:

1buildscript {
2    repositories {
3        google()
4        mavenCentral()
5    }
6    dependencies {
7        classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8        // ...
9    }
10}
11/builds/locuslabs/android-team/locuslabs-android-sdk/app/src/main/AndroidManifest.xml:21: Error: MainActivity must extend android.app.Activity [Instantiatable]
12            android:name=&quot;com.locuslabs.appsdk.MainActivity&quot;
13                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14   Explanation for issues of type &quot;Instantiatable&quot;:
15   Activities, services, broadcast receivers etc. registered in the manifest
16   file (or for custom views, in a layout file) must be &quot;instantiatable&quot; by
17   the system, which means that the class must be public, it must have an
18   empty public constructor, and if it's an inner class, it must be a static
19   inner class.
201 errors, 0 warnings
21Lint found fatal errors while assembling a release target.
22To proceed, either fix the issues identified by lint, or modify your build script as follows:
23...
24android {
25    lintOptions {
26        checkReleaseBuilds false
27        // Or, if you prefer, you can continue to check for errors in release builds,
28        // but continue the build even when errors are found:
29        abortOnError false
30    }
31}
32        &lt;activity
33            android:name=&quot;com.locuslabs.appsdk.MainActivity&quot;
34            android:label=&quot;@string/app_name&quot;
35            android:windowSoftInputMode=&quot;adjustNothing&quot;&gt;
36            &lt;intent-filter&gt;
37                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
38
39                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
40            &lt;/intent-filter&gt;
41        &lt;/activity&gt;
42import androidx.appcompat.app.AppCompatActivity
43
44class MainActivity : AppCompatActivity() {
45    // ...
46}
47android {
48    lintOptions {
49        disable &quot;Instantiatable&quot;
50    }
51}
52

Second, I tried prepending @SdkSuppress("Instantiatable") to the class:

1buildscript {
2    repositories {
3        google()
4        mavenCentral()
5    }
6    dependencies {
7        classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8        // ...
9    }
10}
11/builds/locuslabs/android-team/locuslabs-android-sdk/app/src/main/AndroidManifest.xml:21: Error: MainActivity must extend android.app.Activity [Instantiatable]
12            android:name=&quot;com.locuslabs.appsdk.MainActivity&quot;
13                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14   Explanation for issues of type &quot;Instantiatable&quot;:
15   Activities, services, broadcast receivers etc. registered in the manifest
16   file (or for custom views, in a layout file) must be &quot;instantiatable&quot; by
17   the system, which means that the class must be public, it must have an
18   empty public constructor, and if it's an inner class, it must be a static
19   inner class.
201 errors, 0 warnings
21Lint found fatal errors while assembling a release target.
22To proceed, either fix the issues identified by lint, or modify your build script as follows:
23...
24android {
25    lintOptions {
26        checkReleaseBuilds false
27        // Or, if you prefer, you can continue to check for errors in release builds,
28        // but continue the build even when errors are found:
29        abortOnError false
30    }
31}
32        &lt;activity
33            android:name=&quot;com.locuslabs.appsdk.MainActivity&quot;
34            android:label=&quot;@string/app_name&quot;
35            android:windowSoftInputMode=&quot;adjustNothing&quot;&gt;
36            &lt;intent-filter&gt;
37                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
38
39                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
40            &lt;/intent-filter&gt;
41        &lt;/activity&gt;
42import androidx.appcompat.app.AppCompatActivity
43
44class MainActivity : AppCompatActivity() {
45    // ...
46}
47android {
48    lintOptions {
49        disable &quot;Instantiatable&quot;
50    }
51}
52@SdkSuppress(&quot;Instantiatable&quot;)
53class MainActivity : AppCompatActivity() {
54   // ...
55}
56

Similarly, I tried @SuppressLint("Instantiatable") but that didn't work either.

ANSWER

Answered 2021-Aug-24 at 16:35

the Android Gradle Plugin documentation still says classpath 'com.android.tools.build:gradle:4.2.0' instead of 7.0.1.

You need to read further down the page, to this and this. That table is only relevant for pre-7.0.0 versions.

Is this a bug in Android Gradle Plugin 7.0.1?

Quite possibly. Or, perhaps beyond, as the Instantiatable Lint check has a history of problems.

If your scenario does not match one of those three August 2021 bugs, and you are in position to provide a reproducible test case, file a fresh issue! Beyond that, if a clean-and-rebuild is not clearing up your problem, you might need to simply disable the Instantiatable Lint check for the time being by adding the following to all of your build.gradle files at the application or library level (i.e. all except your project-level build.gradle):

1buildscript {
2    repositories {
3        google()
4        mavenCentral()
5    }
6    dependencies {
7        classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8        // ...
9    }
10}
11/builds/locuslabs/android-team/locuslabs-android-sdk/app/src/main/AndroidManifest.xml:21: Error: MainActivity must extend android.app.Activity [Instantiatable]
12            android:name=&quot;com.locuslabs.appsdk.MainActivity&quot;
13                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14   Explanation for issues of type &quot;Instantiatable&quot;:
15   Activities, services, broadcast receivers etc. registered in the manifest
16   file (or for custom views, in a layout file) must be &quot;instantiatable&quot; by
17   the system, which means that the class must be public, it must have an
18   empty public constructor, and if it's an inner class, it must be a static
19   inner class.
201 errors, 0 warnings
21Lint found fatal errors while assembling a release target.
22To proceed, either fix the issues identified by lint, or modify your build script as follows:
23...
24android {
25    lintOptions {
26        checkReleaseBuilds false
27        // Or, if you prefer, you can continue to check for errors in release builds,
28        // but continue the build even when errors are found:
29        abortOnError false
30    }
31}
32        &lt;activity
33            android:name=&quot;com.locuslabs.appsdk.MainActivity&quot;
34            android:label=&quot;@string/app_name&quot;
35            android:windowSoftInputMode=&quot;adjustNothing&quot;&gt;
36            &lt;intent-filter&gt;
37                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
38
39                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
40            &lt;/intent-filter&gt;
41        &lt;/activity&gt;
42import androidx.appcompat.app.AppCompatActivity
43
44class MainActivity : AppCompatActivity() {
45    // ...
46}
47android {
48    lintOptions {
49        disable &quot;Instantiatable&quot;
50    }
51}
52@SdkSuppress(&quot;Instantiatable&quot;)
53class MainActivity : AppCompatActivity() {
54   // ...
55}
56android {
57    lintOptions {
58        disable &quot;Instantiatable&quot;
59    }
60}
61

Source https://stackoverflow.com/questions/68899665

QUESTION

The unauthenticated git protocol on port 9418 is no longer supported

Asked 2022-Mar-27 at 13:23

I have been using github actions for quite sometime but today my deployments started failing. Below is the error from github action logs

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7

Upon investigation, it appears that below section in my yml file is causing the issue.

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9

I have looked into this change log but can't seem to comprehend the issue.

Additional Details: Server: EC2 Instance Github actions steps:

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55

package.json file

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55   {
56  &quot;name&quot;: &quot;stackstream-fe&quot;,
57  &quot;version&quot;: &quot;1.0.0&quot;,
58  &quot;authors&quot;: [
59    &quot;fayyaznofal@gmail.com&quot;
60  ],
61  &quot;private&quot;: true,
62  &quot;dependencies&quot;: {
63    &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.34&quot;,
64    &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.15.2&quot;,
65    &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.14&quot;,
66    &quot;@fullcalendar/bootstrap&quot;: &quot;^5.5.0&quot;,
67    &quot;@fullcalendar/core&quot;: &quot;^5.5.0&quot;,
68    &quot;@fullcalendar/daygrid&quot;: &quot;^5.5.0&quot;,
69    &quot;@fullcalendar/interaction&quot;: &quot;^5.5.0&quot;,
70    &quot;@fullcalendar/react&quot;: &quot;^5.5.0&quot;,
71    &quot;@lourenci/react-kanban&quot;: &quot;^2.1.0&quot;,
72    &quot;@redux-saga/simple-saga-monitor&quot;: &quot;^1.1.2&quot;,
73    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.9&quot;,
74    &quot;@testing-library/react&quot;: &quot;^11.2.3&quot;,
75    &quot;@testing-library/user-event&quot;: &quot;^12.6.0&quot;,
76    &quot;@toast-ui/react-chart&quot;: &quot;^1.0.2&quot;,
77    &quot;@types/jest&quot;: &quot;^26.0.14&quot;,
78    &quot;@types/node&quot;: &quot;^14.10.3&quot;,
79    &quot;@types/react&quot;: &quot;^16.9.49&quot;,
80    &quot;@types/react-dom&quot;: &quot;^16.9.8&quot;,
81    &quot;@vtaits/react-color-picker&quot;: &quot;^0.1.1&quot;,
82    &quot;apexcharts&quot;: &quot;^3.23.1&quot;,
83    &quot;availity-reactstrap-validation&quot;: &quot;^2.7.0&quot;,
84    &quot;axios&quot;: &quot;^0.21.1&quot;,
85    &quot;axios-mock-adapter&quot;: &quot;^1.19.0&quot;,
86    &quot;axios-progress-bar&quot;: &quot;^1.2.0&quot;,
87    &quot;bootstrap&quot;: &quot;^5.0.0-beta2&quot;,
88    &quot;chart.js&quot;: &quot;^2.9.4&quot;,
89    &quot;chartist&quot;: &quot;^0.11.4&quot;,
90    &quot;classnames&quot;: &quot;^2.2.6&quot;,
91    &quot;components&quot;: &quot;^0.1.0&quot;,
92    &quot;dotenv&quot;: &quot;^8.2.0&quot;,
93    &quot;draft-js&quot;: &quot;^0.11.7&quot;,
94    &quot;echarts&quot;: &quot;^4.9.0&quot;,
95    &quot;echarts-for-react&quot;: &quot;^2.0.16&quot;,
96    &quot;firebase&quot;: &quot;^8.2.3&quot;,
97    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
98    &quot;history&quot;: &quot;^4.10.1&quot;,
99    &quot;i&quot;: &quot;^0.3.6&quot;,
100    &quot;i18next&quot;: &quot;^19.8.4&quot;,
101    &quot;i18next-browser-languagedetector&quot;: &quot;^6.0.1&quot;,
102    &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
103    &quot;leaflet&quot;: &quot;^1.7.1&quot;,
104    &quot;lodash&quot;: &quot;^4.17.21&quot;,
105    &quot;lodash.clonedeep&quot;: &quot;^4.5.0&quot;,
106    &quot;lodash.get&quot;: &quot;^4.4.2&quot;,
107    &quot;metismenujs&quot;: &quot;^1.2.1&quot;,
108    &quot;mkdirp&quot;: &quot;^1.0.4&quot;,
109    &quot;moment&quot;: &quot;2.29.1&quot;,
110    &quot;moment-timezone&quot;: &quot;^0.5.32&quot;,
111    &quot;nouislider-react&quot;: &quot;^3.3.9&quot;,
112    &quot;npm&quot;: &quot;^7.6.3&quot;,
113    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
114    &quot;query-string&quot;: &quot;^6.14.0&quot;,
115    &quot;react&quot;: &quot;^16.13.1&quot;,
116    &quot;react-apexcharts&quot;: &quot;^1.3.7&quot;,
117    &quot;react-auth-code-input&quot;: &quot;^1.0.0&quot;,
118    &quot;react-avatar&quot;: &quot;^3.10.0&quot;,
119    &quot;react-bootstrap&quot;: &quot;^1.5.0&quot;,
120    &quot;react-bootstrap-editable&quot;: &quot;^0.8.2&quot;,
121    &quot;react-bootstrap-sweetalert&quot;: &quot;^5.2.0&quot;,
122    &quot;react-bootstrap-table-next&quot;: &quot;^4.0.3&quot;,
123    &quot;react-bootstrap-table2-editor&quot;: &quot;^1.4.0&quot;,
124    &quot;react-bootstrap-table2-paginator&quot;: &quot;^2.1.2&quot;,
125    &quot;react-bootstrap-table2-toolkit&quot;: &quot;^2.1.3&quot;,
126    &quot;react-chartist&quot;: &quot;^0.14.3&quot;,
127    &quot;react-chartjs-2&quot;: &quot;^2.11.1&quot;,
128    &quot;react-color&quot;: &quot;^2.19.3&quot;,
129    &quot;react-confirm-alert&quot;: &quot;^2.7.0&quot;,
130    &quot;react-content-loader&quot;: &quot;^6.0.1&quot;,
131    &quot;react-countdown&quot;: &quot;^2.3.1&quot;,
132    &quot;react-countup&quot;: &quot;^4.3.3&quot;,
133    &quot;react-cropper&quot;: &quot;^2.1.4&quot;,
134    &quot;react-data-table-component&quot;: &quot;^6.11.8&quot;,
135    &quot;react-date-picker&quot;: &quot;^8.0.6&quot;,
136    &quot;react-datepicker&quot;: &quot;^3.4.1&quot;,
137    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
138    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.5&quot;,
139    &quot;react-drag-listview&quot;: &quot;^0.1.8&quot;,
140    &quot;react-drawer&quot;: &quot;^1.3.4&quot;,
141    &quot;react-dropzone&quot;: &quot;^11.2.4&quot;,
142    &quot;react-dual-listbox&quot;: &quot;^2.0.0&quot;,
143    &quot;react-facebook-login&quot;: &quot;^4.1.1&quot;,
144    &quot;react-flatpickr&quot;: &quot;^3.10.6&quot;,
145    &quot;react-google-login&quot;: &quot;^5.2.2&quot;,
146    &quot;react-hook-form&quot;: &quot;^7.15.2&quot;,
147    &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
148    &quot;react-icons&quot;: &quot;^4.2.0&quot;,
149    &quot;react-image-lightbox&quot;: &quot;^5.1.1&quot;,
150    &quot;react-input-mask&quot;: &quot;^2.0.4&quot;,
151    &quot;react-jvectormap&quot;: &quot;^0.0.16&quot;,
152    &quot;react-leaflet&quot;: &quot;^3.0.5&quot;,
153    &quot;react-meta-tags&quot;: &quot;^1.0.1&quot;,
154    &quot;react-modal-video&quot;: &quot;^1.2.6&quot;,
155    &quot;react-notifications&quot;: &quot;^1.7.2&quot;,
156    &quot;react-number-format&quot;: &quot;^4.7.3&quot;,
157    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
158    &quot;react-rangeslider&quot;: &quot;^2.2.0&quot;,
159    &quot;react-rating&quot;: &quot;^2.0.5&quot;,
160    &quot;react-rating-tooltip&quot;: &quot;^1.1.6&quot;,
161    &quot;react-redux&quot;: &quot;^7.2.1&quot;,
162    &quot;react-responsive-carousel&quot;: &quot;^3.2.11&quot;,
163    &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
164    &quot;react-script&quot;: &quot;^2.0.5&quot;,
165    &quot;react-scripts&quot;: &quot;3.4.3&quot;,
166    &quot;react-select&quot;: &quot;^4.3.1&quot;,
167    &quot;react-sparklines&quot;: &quot;^1.7.0&quot;,
168    &quot;react-star-ratings&quot;: &quot;^2.3.0&quot;,
169    &quot;react-super-responsive-table&quot;: &quot;^5.2.0&quot;,
170    &quot;react-switch&quot;: &quot;^6.0.0&quot;,
171    &quot;react-table&quot;: &quot;^7.6.3&quot;,
172    &quot;react-toastify&quot;: &quot;^7.0.3&quot;,
173    &quot;react-toastr&quot;: &quot;^3.0.0&quot;,
174    &quot;react-twitter-auth&quot;: &quot;0.0.13&quot;,
175    &quot;reactstrap&quot;: &quot;^8.8.1&quot;,
176    &quot;recharts&quot;: &quot;^2.0.8&quot;,
177    &quot;redux&quot;: &quot;^4.0.5&quot;,
178    &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
179    &quot;reselect&quot;: &quot;^4.0.0&quot;,
180    &quot;sass&quot;: &quot;^1.37.5&quot;,
181    &quot;simplebar-react&quot;: &quot;^2.3.0&quot;,
182    &quot;styled&quot;: &quot;^1.0.0&quot;,
183    &quot;styled-components&quot;: &quot;^5.2.1&quot;,
184    &quot;toastr&quot;: &quot;^2.1.4&quot;,
185    &quot;typescript&quot;: &quot;^4.0.2&quot;,
186    &quot;universal-cookie&quot;: &quot;^4.0.4&quot;
187  },
188  &quot;devDependencies&quot;: {
189    &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.27.0&quot;,
190    &quot;@typescript-eslint/parser&quot;: &quot;^2.27.0&quot;,
191    &quot;@typescript-eslint/typescript-estree&quot;: &quot;^4.15.2&quot;,
192    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
193    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
194    &quot;husky&quot;: &quot;^4.2.5&quot;,
195    &quot;lint-staged&quot;: &quot;^10.1.3&quot;,
196    &quot;prettier&quot;: &quot;^1.19.1&quot;,
197    &quot;react-test-renderer&quot;: &quot;^16.13.1&quot;,
198    &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
199    &quot;redux-mock-store&quot;: &quot;^1.5.4&quot;
200  },
201  &quot;scripts&quot;: {
202    &quot;start&quot;: &quot;react-scripts start&quot;,
203    &quot;build&quot;: &quot;react-scripts build &amp;&amp; mv build ./deploy/build&quot;,
204    &quot;build-local&quot;: &quot;react-scripts build&quot;,
205    &quot;test&quot;: &quot;react-scripts test&quot;,
206    &quot;eject&quot;: &quot;react-scripts eject&quot;
207  },
208  &quot;eslintConfig&quot;: {
209    &quot;extends&quot;: &quot;react-app&quot;
210  },
211  &quot;husky&quot;: {
212    &quot;hooks&quot;: {
213      &quot;pre-commit&quot;: &quot;lint-staged&quot;
214    }
215  },
216  &quot;lint-staged&quot;: {
217    &quot;*.{js,ts,tsx}&quot;: [
218      &quot;eslint --fix&quot;
219    ]
220  },
221  &quot;browserslist&quot;: {
222    &quot;production&quot;: [
223      &quot;&gt;0.2%&quot;,
224      &quot;not dead&quot;,
225      &quot;not op_mini all&quot;
226    ],
227    &quot;development&quot;: [
228      &quot;last 1 chrome version&quot;,
229      &quot;last 1 firefox version&quot;,
230      &quot;last 1 safari version&quot;
231    ]
232  }
233}
234

ANSWER

Answered 2022-Mar-16 at 07:01

First, this error message is indeed expected on Jan. 11th, 2022.
See "Improving Git protocol security on GitHub".

January 11, 2022 Final brownout.

This is the full brownout period where we’ll temporarily stop accepting the deprecated key and signature types, ciphers, and MACs, and the unencrypted Git protocol.
This will help clients discover any lingering use of older keys or old URLs.

Second, check your package.json dependencies for any git:// URL, as in this example, fixed in this PR.

As noted by Jörg W Mittag:

There was a 4-month warning.
The entire Internet has been moving away from unauthenticated, unencrypted protocols for a decade, it's not like this is a huge surprise.

Personally, I consider it less an "issue" and more "detecting unmaintained dependencies".

Plus, this is still only the brownout period, so the protocol will only be disabled for a short period of time, allowing developers to discover the problem.

The permanent shutdown is not until March 15th.


For GitHub Actions:

As in actions/checkout issue 14, you can add as a first step:

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55   {
56  &quot;name&quot;: &quot;stackstream-fe&quot;,
57  &quot;version&quot;: &quot;1.0.0&quot;,
58  &quot;authors&quot;: [
59    &quot;fayyaznofal@gmail.com&quot;
60  ],
61  &quot;private&quot;: true,
62  &quot;dependencies&quot;: {
63    &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.34&quot;,
64    &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.15.2&quot;,
65    &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.14&quot;,
66    &quot;@fullcalendar/bootstrap&quot;: &quot;^5.5.0&quot;,
67    &quot;@fullcalendar/core&quot;: &quot;^5.5.0&quot;,
68    &quot;@fullcalendar/daygrid&quot;: &quot;^5.5.0&quot;,
69    &quot;@fullcalendar/interaction&quot;: &quot;^5.5.0&quot;,
70    &quot;@fullcalendar/react&quot;: &quot;^5.5.0&quot;,
71    &quot;@lourenci/react-kanban&quot;: &quot;^2.1.0&quot;,
72    &quot;@redux-saga/simple-saga-monitor&quot;: &quot;^1.1.2&quot;,
73    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.9&quot;,
74    &quot;@testing-library/react&quot;: &quot;^11.2.3&quot;,
75    &quot;@testing-library/user-event&quot;: &quot;^12.6.0&quot;,
76    &quot;@toast-ui/react-chart&quot;: &quot;^1.0.2&quot;,
77    &quot;@types/jest&quot;: &quot;^26.0.14&quot;,
78    &quot;@types/node&quot;: &quot;^14.10.3&quot;,
79    &quot;@types/react&quot;: &quot;^16.9.49&quot;,
80    &quot;@types/react-dom&quot;: &quot;^16.9.8&quot;,
81    &quot;@vtaits/react-color-picker&quot;: &quot;^0.1.1&quot;,
82    &quot;apexcharts&quot;: &quot;^3.23.1&quot;,
83    &quot;availity-reactstrap-validation&quot;: &quot;^2.7.0&quot;,
84    &quot;axios&quot;: &quot;^0.21.1&quot;,
85    &quot;axios-mock-adapter&quot;: &quot;^1.19.0&quot;,
86    &quot;axios-progress-bar&quot;: &quot;^1.2.0&quot;,
87    &quot;bootstrap&quot;: &quot;^5.0.0-beta2&quot;,
88    &quot;chart.js&quot;: &quot;^2.9.4&quot;,
89    &quot;chartist&quot;: &quot;^0.11.4&quot;,
90    &quot;classnames&quot;: &quot;^2.2.6&quot;,
91    &quot;components&quot;: &quot;^0.1.0&quot;,
92    &quot;dotenv&quot;: &quot;^8.2.0&quot;,
93    &quot;draft-js&quot;: &quot;^0.11.7&quot;,
94    &quot;echarts&quot;: &quot;^4.9.0&quot;,
95    &quot;echarts-for-react&quot;: &quot;^2.0.16&quot;,
96    &quot;firebase&quot;: &quot;^8.2.3&quot;,
97    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
98    &quot;history&quot;: &quot;^4.10.1&quot;,
99    &quot;i&quot;: &quot;^0.3.6&quot;,
100    &quot;i18next&quot;: &quot;^19.8.4&quot;,
101    &quot;i18next-browser-languagedetector&quot;: &quot;^6.0.1&quot;,
102    &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
103    &quot;leaflet&quot;: &quot;^1.7.1&quot;,
104    &quot;lodash&quot;: &quot;^4.17.21&quot;,
105    &quot;lodash.clonedeep&quot;: &quot;^4.5.0&quot;,
106    &quot;lodash.get&quot;: &quot;^4.4.2&quot;,
107    &quot;metismenujs&quot;: &quot;^1.2.1&quot;,
108    &quot;mkdirp&quot;: &quot;^1.0.4&quot;,
109    &quot;moment&quot;: &quot;2.29.1&quot;,
110    &quot;moment-timezone&quot;: &quot;^0.5.32&quot;,
111    &quot;nouislider-react&quot;: &quot;^3.3.9&quot;,
112    &quot;npm&quot;: &quot;^7.6.3&quot;,
113    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
114    &quot;query-string&quot;: &quot;^6.14.0&quot;,
115    &quot;react&quot;: &quot;^16.13.1&quot;,
116    &quot;react-apexcharts&quot;: &quot;^1.3.7&quot;,
117    &quot;react-auth-code-input&quot;: &quot;^1.0.0&quot;,
118    &quot;react-avatar&quot;: &quot;^3.10.0&quot;,
119    &quot;react-bootstrap&quot;: &quot;^1.5.0&quot;,
120    &quot;react-bootstrap-editable&quot;: &quot;^0.8.2&quot;,
121    &quot;react-bootstrap-sweetalert&quot;: &quot;^5.2.0&quot;,
122    &quot;react-bootstrap-table-next&quot;: &quot;^4.0.3&quot;,
123    &quot;react-bootstrap-table2-editor&quot;: &quot;^1.4.0&quot;,
124    &quot;react-bootstrap-table2-paginator&quot;: &quot;^2.1.2&quot;,
125    &quot;react-bootstrap-table2-toolkit&quot;: &quot;^2.1.3&quot;,
126    &quot;react-chartist&quot;: &quot;^0.14.3&quot;,
127    &quot;react-chartjs-2&quot;: &quot;^2.11.1&quot;,
128    &quot;react-color&quot;: &quot;^2.19.3&quot;,
129    &quot;react-confirm-alert&quot;: &quot;^2.7.0&quot;,
130    &quot;react-content-loader&quot;: &quot;^6.0.1&quot;,
131    &quot;react-countdown&quot;: &quot;^2.3.1&quot;,
132    &quot;react-countup&quot;: &quot;^4.3.3&quot;,
133    &quot;react-cropper&quot;: &quot;^2.1.4&quot;,
134    &quot;react-data-table-component&quot;: &quot;^6.11.8&quot;,
135    &quot;react-date-picker&quot;: &quot;^8.0.6&quot;,
136    &quot;react-datepicker&quot;: &quot;^3.4.1&quot;,
137    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
138    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.5&quot;,
139    &quot;react-drag-listview&quot;: &quot;^0.1.8&quot;,
140    &quot;react-drawer&quot;: &quot;^1.3.4&quot;,
141    &quot;react-dropzone&quot;: &quot;^11.2.4&quot;,
142    &quot;react-dual-listbox&quot;: &quot;^2.0.0&quot;,
143    &quot;react-facebook-login&quot;: &quot;^4.1.1&quot;,
144    &quot;react-flatpickr&quot;: &quot;^3.10.6&quot;,
145    &quot;react-google-login&quot;: &quot;^5.2.2&quot;,
146    &quot;react-hook-form&quot;: &quot;^7.15.2&quot;,
147    &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
148    &quot;react-icons&quot;: &quot;^4.2.0&quot;,
149    &quot;react-image-lightbox&quot;: &quot;^5.1.1&quot;,
150    &quot;react-input-mask&quot;: &quot;^2.0.4&quot;,
151    &quot;react-jvectormap&quot;: &quot;^0.0.16&quot;,
152    &quot;react-leaflet&quot;: &quot;^3.0.5&quot;,
153    &quot;react-meta-tags&quot;: &quot;^1.0.1&quot;,
154    &quot;react-modal-video&quot;: &quot;^1.2.6&quot;,
155    &quot;react-notifications&quot;: &quot;^1.7.2&quot;,
156    &quot;react-number-format&quot;: &quot;^4.7.3&quot;,
157    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
158    &quot;react-rangeslider&quot;: &quot;^2.2.0&quot;,
159    &quot;react-rating&quot;: &quot;^2.0.5&quot;,
160    &quot;react-rating-tooltip&quot;: &quot;^1.1.6&quot;,
161    &quot;react-redux&quot;: &quot;^7.2.1&quot;,
162    &quot;react-responsive-carousel&quot;: &quot;^3.2.11&quot;,
163    &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
164    &quot;react-script&quot;: &quot;^2.0.5&quot;,
165    &quot;react-scripts&quot;: &quot;3.4.3&quot;,
166    &quot;react-select&quot;: &quot;^4.3.1&quot;,
167    &quot;react-sparklines&quot;: &quot;^1.7.0&quot;,
168    &quot;react-star-ratings&quot;: &quot;^2.3.0&quot;,
169    &quot;react-super-responsive-table&quot;: &quot;^5.2.0&quot;,
170    &quot;react-switch&quot;: &quot;^6.0.0&quot;,
171    &quot;react-table&quot;: &quot;^7.6.3&quot;,
172    &quot;react-toastify&quot;: &quot;^7.0.3&quot;,
173    &quot;react-toastr&quot;: &quot;^3.0.0&quot;,
174    &quot;react-twitter-auth&quot;: &quot;0.0.13&quot;,
175    &quot;reactstrap&quot;: &quot;^8.8.1&quot;,
176    &quot;recharts&quot;: &quot;^2.0.8&quot;,
177    &quot;redux&quot;: &quot;^4.0.5&quot;,
178    &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
179    &quot;reselect&quot;: &quot;^4.0.0&quot;,
180    &quot;sass&quot;: &quot;^1.37.5&quot;,
181    &quot;simplebar-react&quot;: &quot;^2.3.0&quot;,
182    &quot;styled&quot;: &quot;^1.0.0&quot;,
183    &quot;styled-components&quot;: &quot;^5.2.1&quot;,
184    &quot;toastr&quot;: &quot;^2.1.4&quot;,
185    &quot;typescript&quot;: &quot;^4.0.2&quot;,
186    &quot;universal-cookie&quot;: &quot;^4.0.4&quot;
187  },
188  &quot;devDependencies&quot;: {
189    &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.27.0&quot;,
190    &quot;@typescript-eslint/parser&quot;: &quot;^2.27.0&quot;,
191    &quot;@typescript-eslint/typescript-estree&quot;: &quot;^4.15.2&quot;,
192    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
193    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
194    &quot;husky&quot;: &quot;^4.2.5&quot;,
195    &quot;lint-staged&quot;: &quot;^10.1.3&quot;,
196    &quot;prettier&quot;: &quot;^1.19.1&quot;,
197    &quot;react-test-renderer&quot;: &quot;^16.13.1&quot;,
198    &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
199    &quot;redux-mock-store&quot;: &quot;^1.5.4&quot;
200  },
201  &quot;scripts&quot;: {
202    &quot;start&quot;: &quot;react-scripts start&quot;,
203    &quot;build&quot;: &quot;react-scripts build &amp;&amp; mv build ./deploy/build&quot;,
204    &quot;build-local&quot;: &quot;react-scripts build&quot;,
205    &quot;test&quot;: &quot;react-scripts test&quot;,
206    &quot;eject&quot;: &quot;react-scripts eject&quot;
207  },
208  &quot;eslintConfig&quot;: {
209    &quot;extends&quot;: &quot;react-app&quot;
210  },
211  &quot;husky&quot;: {
212    &quot;hooks&quot;: {
213      &quot;pre-commit&quot;: &quot;lint-staged&quot;
214    }
215  },
216  &quot;lint-staged&quot;: {
217    &quot;*.{js,ts,tsx}&quot;: [
218      &quot;eslint --fix&quot;
219    ]
220  },
221  &quot;browserslist&quot;: {
222    &quot;production&quot;: [
223      &quot;&gt;0.2%&quot;,
224      &quot;not dead&quot;,
225      &quot;not op_mini all&quot;
226    ],
227    &quot;development&quot;: [
228      &quot;last 1 chrome version&quot;,
229      &quot;last 1 firefox version&quot;,
230      &quot;last 1 safari version&quot;
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url &quot;https://github.com/&quot;]\n  insteadOf = &quot;git://github.com/&quot;' &gt;&gt; ~/.gitconfig
236

That will change any git://github.com/ into https://github.com/.

For local projects

For all your repositories, you can set:

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55   {
56  &quot;name&quot;: &quot;stackstream-fe&quot;,
57  &quot;version&quot;: &quot;1.0.0&quot;,
58  &quot;authors&quot;: [
59    &quot;fayyaznofal@gmail.com&quot;
60  ],
61  &quot;private&quot;: true,
62  &quot;dependencies&quot;: {
63    &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.34&quot;,
64    &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.15.2&quot;,
65    &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.14&quot;,
66    &quot;@fullcalendar/bootstrap&quot;: &quot;^5.5.0&quot;,
67    &quot;@fullcalendar/core&quot;: &quot;^5.5.0&quot;,
68    &quot;@fullcalendar/daygrid&quot;: &quot;^5.5.0&quot;,
69    &quot;@fullcalendar/interaction&quot;: &quot;^5.5.0&quot;,
70    &quot;@fullcalendar/react&quot;: &quot;^5.5.0&quot;,
71    &quot;@lourenci/react-kanban&quot;: &quot;^2.1.0&quot;,
72    &quot;@redux-saga/simple-saga-monitor&quot;: &quot;^1.1.2&quot;,
73    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.9&quot;,
74    &quot;@testing-library/react&quot;: &quot;^11.2.3&quot;,
75    &quot;@testing-library/user-event&quot;: &quot;^12.6.0&quot;,
76    &quot;@toast-ui/react-chart&quot;: &quot;^1.0.2&quot;,
77    &quot;@types/jest&quot;: &quot;^26.0.14&quot;,
78    &quot;@types/node&quot;: &quot;^14.10.3&quot;,
79    &quot;@types/react&quot;: &quot;^16.9.49&quot;,
80    &quot;@types/react-dom&quot;: &quot;^16.9.8&quot;,
81    &quot;@vtaits/react-color-picker&quot;: &quot;^0.1.1&quot;,
82    &quot;apexcharts&quot;: &quot;^3.23.1&quot;,
83    &quot;availity-reactstrap-validation&quot;: &quot;^2.7.0&quot;,
84    &quot;axios&quot;: &quot;^0.21.1&quot;,
85    &quot;axios-mock-adapter&quot;: &quot;^1.19.0&quot;,
86    &quot;axios-progress-bar&quot;: &quot;^1.2.0&quot;,
87    &quot;bootstrap&quot;: &quot;^5.0.0-beta2&quot;,
88    &quot;chart.js&quot;: &quot;^2.9.4&quot;,
89    &quot;chartist&quot;: &quot;^0.11.4&quot;,
90    &quot;classnames&quot;: &quot;^2.2.6&quot;,
91    &quot;components&quot;: &quot;^0.1.0&quot;,
92    &quot;dotenv&quot;: &quot;^8.2.0&quot;,
93    &quot;draft-js&quot;: &quot;^0.11.7&quot;,
94    &quot;echarts&quot;: &quot;^4.9.0&quot;,
95    &quot;echarts-for-react&quot;: &quot;^2.0.16&quot;,
96    &quot;firebase&quot;: &quot;^8.2.3&quot;,
97    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
98    &quot;history&quot;: &quot;^4.10.1&quot;,
99    &quot;i&quot;: &quot;^0.3.6&quot;,
100    &quot;i18next&quot;: &quot;^19.8.4&quot;,
101    &quot;i18next-browser-languagedetector&quot;: &quot;^6.0.1&quot;,
102    &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
103    &quot;leaflet&quot;: &quot;^1.7.1&quot;,
104    &quot;lodash&quot;: &quot;^4.17.21&quot;,
105    &quot;lodash.clonedeep&quot;: &quot;^4.5.0&quot;,
106    &quot;lodash.get&quot;: &quot;^4.4.2&quot;,
107    &quot;metismenujs&quot;: &quot;^1.2.1&quot;,
108    &quot;mkdirp&quot;: &quot;^1.0.4&quot;,
109    &quot;moment&quot;: &quot;2.29.1&quot;,
110    &quot;moment-timezone&quot;: &quot;^0.5.32&quot;,
111    &quot;nouislider-react&quot;: &quot;^3.3.9&quot;,
112    &quot;npm&quot;: &quot;^7.6.3&quot;,
113    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
114    &quot;query-string&quot;: &quot;^6.14.0&quot;,
115    &quot;react&quot;: &quot;^16.13.1&quot;,
116    &quot;react-apexcharts&quot;: &quot;^1.3.7&quot;,
117    &quot;react-auth-code-input&quot;: &quot;^1.0.0&quot;,
118    &quot;react-avatar&quot;: &quot;^3.10.0&quot;,
119    &quot;react-bootstrap&quot;: &quot;^1.5.0&quot;,
120    &quot;react-bootstrap-editable&quot;: &quot;^0.8.2&quot;,
121    &quot;react-bootstrap-sweetalert&quot;: &quot;^5.2.0&quot;,
122    &quot;react-bootstrap-table-next&quot;: &quot;^4.0.3&quot;,
123    &quot;react-bootstrap-table2-editor&quot;: &quot;^1.4.0&quot;,
124    &quot;react-bootstrap-table2-paginator&quot;: &quot;^2.1.2&quot;,
125    &quot;react-bootstrap-table2-toolkit&quot;: &quot;^2.1.3&quot;,
126    &quot;react-chartist&quot;: &quot;^0.14.3&quot;,
127    &quot;react-chartjs-2&quot;: &quot;^2.11.1&quot;,
128    &quot;react-color&quot;: &quot;^2.19.3&quot;,
129    &quot;react-confirm-alert&quot;: &quot;^2.7.0&quot;,
130    &quot;react-content-loader&quot;: &quot;^6.0.1&quot;,
131    &quot;react-countdown&quot;: &quot;^2.3.1&quot;,
132    &quot;react-countup&quot;: &quot;^4.3.3&quot;,
133    &quot;react-cropper&quot;: &quot;^2.1.4&quot;,
134    &quot;react-data-table-component&quot;: &quot;^6.11.8&quot;,
135    &quot;react-date-picker&quot;: &quot;^8.0.6&quot;,
136    &quot;react-datepicker&quot;: &quot;^3.4.1&quot;,
137    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
138    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.5&quot;,
139    &quot;react-drag-listview&quot;: &quot;^0.1.8&quot;,
140    &quot;react-drawer&quot;: &quot;^1.3.4&quot;,
141    &quot;react-dropzone&quot;: &quot;^11.2.4&quot;,
142    &quot;react-dual-listbox&quot;: &quot;^2.0.0&quot;,
143    &quot;react-facebook-login&quot;: &quot;^4.1.1&quot;,
144    &quot;react-flatpickr&quot;: &quot;^3.10.6&quot;,
145    &quot;react-google-login&quot;: &quot;^5.2.2&quot;,
146    &quot;react-hook-form&quot;: &quot;^7.15.2&quot;,
147    &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
148    &quot;react-icons&quot;: &quot;^4.2.0&quot;,
149    &quot;react-image-lightbox&quot;: &quot;^5.1.1&quot;,
150    &quot;react-input-mask&quot;: &quot;^2.0.4&quot;,
151    &quot;react-jvectormap&quot;: &quot;^0.0.16&quot;,
152    &quot;react-leaflet&quot;: &quot;^3.0.5&quot;,
153    &quot;react-meta-tags&quot;: &quot;^1.0.1&quot;,
154    &quot;react-modal-video&quot;: &quot;^1.2.6&quot;,
155    &quot;react-notifications&quot;: &quot;^1.7.2&quot;,
156    &quot;react-number-format&quot;: &quot;^4.7.3&quot;,
157    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
158    &quot;react-rangeslider&quot;: &quot;^2.2.0&quot;,
159    &quot;react-rating&quot;: &quot;^2.0.5&quot;,
160    &quot;react-rating-tooltip&quot;: &quot;^1.1.6&quot;,
161    &quot;react-redux&quot;: &quot;^7.2.1&quot;,
162    &quot;react-responsive-carousel&quot;: &quot;^3.2.11&quot;,
163    &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
164    &quot;react-script&quot;: &quot;^2.0.5&quot;,
165    &quot;react-scripts&quot;: &quot;3.4.3&quot;,
166    &quot;react-select&quot;: &quot;^4.3.1&quot;,
167    &quot;react-sparklines&quot;: &quot;^1.7.0&quot;,
168    &quot;react-star-ratings&quot;: &quot;^2.3.0&quot;,
169    &quot;react-super-responsive-table&quot;: &quot;^5.2.0&quot;,
170    &quot;react-switch&quot;: &quot;^6.0.0&quot;,
171    &quot;react-table&quot;: &quot;^7.6.3&quot;,
172    &quot;react-toastify&quot;: &quot;^7.0.3&quot;,
173    &quot;react-toastr&quot;: &quot;^3.0.0&quot;,
174    &quot;react-twitter-auth&quot;: &quot;0.0.13&quot;,
175    &quot;reactstrap&quot;: &quot;^8.8.1&quot;,
176    &quot;recharts&quot;: &quot;^2.0.8&quot;,
177    &quot;redux&quot;: &quot;^4.0.5&quot;,
178    &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
179    &quot;reselect&quot;: &quot;^4.0.0&quot;,
180    &quot;sass&quot;: &quot;^1.37.5&quot;,
181    &quot;simplebar-react&quot;: &quot;^2.3.0&quot;,
182    &quot;styled&quot;: &quot;^1.0.0&quot;,
183    &quot;styled-components&quot;: &quot;^5.2.1&quot;,
184    &quot;toastr&quot;: &quot;^2.1.4&quot;,
185    &quot;typescript&quot;: &quot;^4.0.2&quot;,
186    &quot;universal-cookie&quot;: &quot;^4.0.4&quot;
187  },
188  &quot;devDependencies&quot;: {
189    &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.27.0&quot;,
190    &quot;@typescript-eslint/parser&quot;: &quot;^2.27.0&quot;,
191    &quot;@typescript-eslint/typescript-estree&quot;: &quot;^4.15.2&quot;,
192    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
193    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
194    &quot;husky&quot;: &quot;^4.2.5&quot;,
195    &quot;lint-staged&quot;: &quot;^10.1.3&quot;,
196    &quot;prettier&quot;: &quot;^1.19.1&quot;,
197    &quot;react-test-renderer&quot;: &quot;^16.13.1&quot;,
198    &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
199    &quot;redux-mock-store&quot;: &quot;^1.5.4&quot;
200  },
201  &quot;scripts&quot;: {
202    &quot;start&quot;: &quot;react-scripts start&quot;,
203    &quot;build&quot;: &quot;react-scripts build &amp;&amp; mv build ./deploy/build&quot;,
204    &quot;build-local&quot;: &quot;react-scripts build&quot;,
205    &quot;test&quot;: &quot;react-scripts test&quot;,
206    &quot;eject&quot;: &quot;react-scripts eject&quot;
207  },
208  &quot;eslintConfig&quot;: {
209    &quot;extends&quot;: &quot;react-app&quot;
210  },
211  &quot;husky&quot;: {
212    &quot;hooks&quot;: {
213      &quot;pre-commit&quot;: &quot;lint-staged&quot;
214    }
215  },
216  &quot;lint-staged&quot;: {
217    &quot;*.{js,ts,tsx}&quot;: [
218      &quot;eslint --fix&quot;
219    ]
220  },
221  &quot;browserslist&quot;: {
222    &quot;production&quot;: [
223      &quot;&gt;0.2%&quot;,
224      &quot;not dead&quot;,
225      &quot;not op_mini all&quot;
226    ],
227    &quot;development&quot;: [
228      &quot;last 1 chrome version&quot;,
229      &quot;last 1 firefox version&quot;,
230      &quot;last 1 safari version&quot;
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url &quot;https://github.com/&quot;]\n  insteadOf = &quot;git://github.com/&quot;' &gt;&gt; ~/.gitconfig
236git config --global url.&quot;https://github.com/&quot;.insteadOf git://github.com/
237

You can also use SSH, but GitHub Security reminds us that, as of March 15th, 2022, GitHub stopped accepting DSA keys. RSA keys uploaded after Nov 2, 2021 will work only with SHA-2 signatures.
The deprecated MACs, ciphers, and unencrypted Git protocol are permanently disabled.

So this (with the right key) would work:

1Command: git
2Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
3Directory: /home/runner/work/stackstream-fe/stackstream-fe
4Output:
5fatal: remote error: 
6  The unauthenticated git protocol on port 9418 is no longer supported.
7    - name: Installing modules
8      run: yarn install
9  steps:
10  - name: Checkout
11    uses: actions/checkout@v2
12
13  - id: vars
14    run: |
15      if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo &quot;::set-output name=environment::prod_stackstream&quot; ; echo &quot;::set-output name=api-url::api&quot; ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo &quot;::set-output name=environment::staging_stackstream&quot;  ; echo &quot;::set-output name=api-url::stagingapi&quot; ; else echo &quot;::set-output name=environment::dev_stackstream&quot; ; echo &quot;::set-output name=api-url::devapi&quot; ; fi
16
17  - uses: pCYSl5EDgo/cat@master
18    id: slack
19    with:
20      path: .github/workflows/slack.txt
21
22  - name: Slack Start Notification
23    uses: 8398a7/action-slack@v3
24    env:
25      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
26      ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
27      COLOR: good
28      STATUS: '`Started`'
29    with:
30      status: custom
31      fields: workflow,job,commit,repo,ref,author,took
32      custom_payload: |
33        ${{ steps.slack.outputs.text }}
34
35  - name: Installing modules
36    env:
37      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
38    run: yarn install
39
40  - name: Create Frontend Build
41    env:
42      REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
43    run: yarn build
44
45  - name: Deploy to Frontend Server DEV
46    if: ${{ contains(github.ref, 'dev') }}
47    uses: easingthemes/ssh-deploy@v2.1.5
48    env:
49      SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
50      ARGS: '-rltgoDzvO --delete'
51      SOURCE: 'deploy/'
52      REMOTE_HOST: ${{ secrets.DEV_HOST }}
53      REMOTE_USER: plyfolio-dev
54      TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
55   {
56  &quot;name&quot;: &quot;stackstream-fe&quot;,
57  &quot;version&quot;: &quot;1.0.0&quot;,
58  &quot;authors&quot;: [
59    &quot;fayyaznofal@gmail.com&quot;
60  ],
61  &quot;private&quot;: true,
62  &quot;dependencies&quot;: {
63    &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;^1.2.34&quot;,
64    &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;^5.15.2&quot;,
65    &quot;@fortawesome/react-fontawesome&quot;: &quot;^0.1.14&quot;,
66    &quot;@fullcalendar/bootstrap&quot;: &quot;^5.5.0&quot;,
67    &quot;@fullcalendar/core&quot;: &quot;^5.5.0&quot;,
68    &quot;@fullcalendar/daygrid&quot;: &quot;^5.5.0&quot;,
69    &quot;@fullcalendar/interaction&quot;: &quot;^5.5.0&quot;,
70    &quot;@fullcalendar/react&quot;: &quot;^5.5.0&quot;,
71    &quot;@lourenci/react-kanban&quot;: &quot;^2.1.0&quot;,
72    &quot;@redux-saga/simple-saga-monitor&quot;: &quot;^1.1.2&quot;,
73    &quot;@testing-library/jest-dom&quot;: &quot;^5.11.9&quot;,
74    &quot;@testing-library/react&quot;: &quot;^11.2.3&quot;,
75    &quot;@testing-library/user-event&quot;: &quot;^12.6.0&quot;,
76    &quot;@toast-ui/react-chart&quot;: &quot;^1.0.2&quot;,
77    &quot;@types/jest&quot;: &quot;^26.0.14&quot;,
78    &quot;@types/node&quot;: &quot;^14.10.3&quot;,
79    &quot;@types/react&quot;: &quot;^16.9.49&quot;,
80    &quot;@types/react-dom&quot;: &quot;^16.9.8&quot;,
81    &quot;@vtaits/react-color-picker&quot;: &quot;^0.1.1&quot;,
82    &quot;apexcharts&quot;: &quot;^3.23.1&quot;,
83    &quot;availity-reactstrap-validation&quot;: &quot;^2.7.0&quot;,
84    &quot;axios&quot;: &quot;^0.21.1&quot;,
85    &quot;axios-mock-adapter&quot;: &quot;^1.19.0&quot;,
86    &quot;axios-progress-bar&quot;: &quot;^1.2.0&quot;,
87    &quot;bootstrap&quot;: &quot;^5.0.0-beta2&quot;,
88    &quot;chart.js&quot;: &quot;^2.9.4&quot;,
89    &quot;chartist&quot;: &quot;^0.11.4&quot;,
90    &quot;classnames&quot;: &quot;^2.2.6&quot;,
91    &quot;components&quot;: &quot;^0.1.0&quot;,
92    &quot;dotenv&quot;: &quot;^8.2.0&quot;,
93    &quot;draft-js&quot;: &quot;^0.11.7&quot;,
94    &quot;echarts&quot;: &quot;^4.9.0&quot;,
95    &quot;echarts-for-react&quot;: &quot;^2.0.16&quot;,
96    &quot;firebase&quot;: &quot;^8.2.3&quot;,
97    &quot;google-maps-react&quot;: &quot;^2.0.6&quot;,
98    &quot;history&quot;: &quot;^4.10.1&quot;,
99    &quot;i&quot;: &quot;^0.3.6&quot;,
100    &quot;i18next&quot;: &quot;^19.8.4&quot;,
101    &quot;i18next-browser-languagedetector&quot;: &quot;^6.0.1&quot;,
102    &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
103    &quot;leaflet&quot;: &quot;^1.7.1&quot;,
104    &quot;lodash&quot;: &quot;^4.17.21&quot;,
105    &quot;lodash.clonedeep&quot;: &quot;^4.5.0&quot;,
106    &quot;lodash.get&quot;: &quot;^4.4.2&quot;,
107    &quot;metismenujs&quot;: &quot;^1.2.1&quot;,
108    &quot;mkdirp&quot;: &quot;^1.0.4&quot;,
109    &quot;moment&quot;: &quot;2.29.1&quot;,
110    &quot;moment-timezone&quot;: &quot;^0.5.32&quot;,
111    &quot;nouislider-react&quot;: &quot;^3.3.9&quot;,
112    &quot;npm&quot;: &quot;^7.6.3&quot;,
113    &quot;prop-types&quot;: &quot;^15.7.2&quot;,
114    &quot;query-string&quot;: &quot;^6.14.0&quot;,
115    &quot;react&quot;: &quot;^16.13.1&quot;,
116    &quot;react-apexcharts&quot;: &quot;^1.3.7&quot;,
117    &quot;react-auth-code-input&quot;: &quot;^1.0.0&quot;,
118    &quot;react-avatar&quot;: &quot;^3.10.0&quot;,
119    &quot;react-bootstrap&quot;: &quot;^1.5.0&quot;,
120    &quot;react-bootstrap-editable&quot;: &quot;^0.8.2&quot;,
121    &quot;react-bootstrap-sweetalert&quot;: &quot;^5.2.0&quot;,
122    &quot;react-bootstrap-table-next&quot;: &quot;^4.0.3&quot;,
123    &quot;react-bootstrap-table2-editor&quot;: &quot;^1.4.0&quot;,
124    &quot;react-bootstrap-table2-paginator&quot;: &quot;^2.1.2&quot;,
125    &quot;react-bootstrap-table2-toolkit&quot;: &quot;^2.1.3&quot;,
126    &quot;react-chartist&quot;: &quot;^0.14.3&quot;,
127    &quot;react-chartjs-2&quot;: &quot;^2.11.1&quot;,
128    &quot;react-color&quot;: &quot;^2.19.3&quot;,
129    &quot;react-confirm-alert&quot;: &quot;^2.7.0&quot;,
130    &quot;react-content-loader&quot;: &quot;^6.0.1&quot;,
131    &quot;react-countdown&quot;: &quot;^2.3.1&quot;,
132    &quot;react-countup&quot;: &quot;^4.3.3&quot;,
133    &quot;react-cropper&quot;: &quot;^2.1.4&quot;,
134    &quot;react-data-table-component&quot;: &quot;^6.11.8&quot;,
135    &quot;react-date-picker&quot;: &quot;^8.0.6&quot;,
136    &quot;react-datepicker&quot;: &quot;^3.4.1&quot;,
137    &quot;react-dom&quot;: &quot;^16.13.1&quot;,
138    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.5&quot;,
139    &quot;react-drag-listview&quot;: &quot;^0.1.8&quot;,
140    &quot;react-drawer&quot;: &quot;^1.3.4&quot;,
141    &quot;react-dropzone&quot;: &quot;^11.2.4&quot;,
142    &quot;react-dual-listbox&quot;: &quot;^2.0.0&quot;,
143    &quot;react-facebook-login&quot;: &quot;^4.1.1&quot;,
144    &quot;react-flatpickr&quot;: &quot;^3.10.6&quot;,
145    &quot;react-google-login&quot;: &quot;^5.2.2&quot;,
146    &quot;react-hook-form&quot;: &quot;^7.15.2&quot;,
147    &quot;react-i18next&quot;: &quot;^11.8.5&quot;,
148    &quot;react-icons&quot;: &quot;^4.2.0&quot;,
149    &quot;react-image-lightbox&quot;: &quot;^5.1.1&quot;,
150    &quot;react-input-mask&quot;: &quot;^2.0.4&quot;,
151    &quot;react-jvectormap&quot;: &quot;^0.0.16&quot;,
152    &quot;react-leaflet&quot;: &quot;^3.0.5&quot;,
153    &quot;react-meta-tags&quot;: &quot;^1.0.1&quot;,
154    &quot;react-modal-video&quot;: &quot;^1.2.6&quot;,
155    &quot;react-notifications&quot;: &quot;^1.7.2&quot;,
156    &quot;react-number-format&quot;: &quot;^4.7.3&quot;,
157    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
158    &quot;react-rangeslider&quot;: &quot;^2.2.0&quot;,
159    &quot;react-rating&quot;: &quot;^2.0.5&quot;,
160    &quot;react-rating-tooltip&quot;: &quot;^1.1.6&quot;,
161    &quot;react-redux&quot;: &quot;^7.2.1&quot;,
162    &quot;react-responsive-carousel&quot;: &quot;^3.2.11&quot;,
163    &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
164    &quot;react-script&quot;: &quot;^2.0.5&quot;,
165    &quot;react-scripts&quot;: &quot;3.4.3&quot;,
166    &quot;react-select&quot;: &quot;^4.3.1&quot;,
167    &quot;react-sparklines&quot;: &quot;^1.7.0&quot;,
168    &quot;react-star-ratings&quot;: &quot;^2.3.0&quot;,
169    &quot;react-super-responsive-table&quot;: &quot;^5.2.0&quot;,
170    &quot;react-switch&quot;: &quot;^6.0.0&quot;,
171    &quot;react-table&quot;: &quot;^7.6.3&quot;,
172    &quot;react-toastify&quot;: &quot;^7.0.3&quot;,
173    &quot;react-toastr&quot;: &quot;^3.0.0&quot;,
174    &quot;react-twitter-auth&quot;: &quot;0.0.13&quot;,
175    &quot;reactstrap&quot;: &quot;^8.8.1&quot;,
176    &quot;recharts&quot;: &quot;^2.0.8&quot;,
177    &quot;redux&quot;: &quot;^4.0.5&quot;,
178    &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
179    &quot;reselect&quot;: &quot;^4.0.0&quot;,
180    &quot;sass&quot;: &quot;^1.37.5&quot;,
181    &quot;simplebar-react&quot;: &quot;^2.3.0&quot;,
182    &quot;styled&quot;: &quot;^1.0.0&quot;,
183    &quot;styled-components&quot;: &quot;^5.2.1&quot;,
184    &quot;toastr&quot;: &quot;^2.1.4&quot;,
185    &quot;typescript&quot;: &quot;^4.0.2&quot;,
186    &quot;universal-cookie&quot;: &quot;^4.0.4&quot;
187  },
188  &quot;devDependencies&quot;: {
189    &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.27.0&quot;,
190    &quot;@typescript-eslint/parser&quot;: &quot;^2.27.0&quot;,
191    &quot;@typescript-eslint/typescript-estree&quot;: &quot;^4.15.2&quot;,
192    &quot;eslint-config-prettier&quot;: &quot;^6.10.1&quot;,
193    &quot;eslint-plugin-prettier&quot;: &quot;^3.1.2&quot;,
194    &quot;husky&quot;: &quot;^4.2.5&quot;,
195    &quot;lint-staged&quot;: &quot;^10.1.3&quot;,
196    &quot;prettier&quot;: &quot;^1.19.1&quot;,
197    &quot;react-test-renderer&quot;: &quot;^16.13.1&quot;,
198    &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
199    &quot;redux-mock-store&quot;: &quot;^1.5.4&quot;
200  },
201  &quot;scripts&quot;: {
202    &quot;start&quot;: &quot;react-scripts start&quot;,
203    &quot;build&quot;: &quot;react-scripts build &amp;&amp; mv build ./deploy/build&quot;,
204    &quot;build-local&quot;: &quot;react-scripts build&quot;,
205    &quot;test&quot;: &quot;react-scripts test&quot;,
206    &quot;eject&quot;: &quot;react-scripts eject&quot;
207  },
208  &quot;eslintConfig&quot;: {
209    &quot;extends&quot;: &quot;react-app&quot;
210  },
211  &quot;husky&quot;: {
212    &quot;hooks&quot;: {
213      &quot;pre-commit&quot;: &quot;lint-staged&quot;
214    }
215  },
216  &quot;lint-staged&quot;: {
217    &quot;*.{js,ts,tsx}&quot;: [
218      &quot;eslint --fix&quot;
219    ]
220  },
221  &quot;browserslist&quot;: {
222    &quot;production&quot;: [
223      &quot;&gt;0.2%&quot;,
224      &quot;not dead&quot;,
225      &quot;not op_mini all&quot;
226    ],
227    &quot;development&quot;: [
228      &quot;last 1 chrome version&quot;,
229      &quot;last 1 firefox version&quot;,
230      &quot;last 1 safari version&quot;
231    ]
232  }
233}
234    - name: Fix up git URLs
235      run: echo -e '[url &quot;https://github.com/&quot;]\n  insteadOf = &quot;git://github.com/&quot;' &gt;&gt; ~/.gitconfig
236git config --global url.&quot;https://github.com/&quot;.insteadOf git://github.com/
237git config --global url.&quot;git@github.com:&quot;.insteadOf git://github.com/
238

That will change any git://github.com/ (unencrypted Git protocol) into git@github.com: (SSH URL).

Source https://stackoverflow.com/questions/70663523

QUESTION

Filter a dictionary of lists

Asked 2022-Mar-24 at 07:56

I have a dictionary of the form:

1{&quot;level&quot;: [1, 2, 3],
2 &quot;conf&quot;: [-1, 1, 2],
3 &quot;text&quot;: [&quot;here&quot;, &quot;hel&quot;, &quot;llo&quot;]}
4

I want to filter the lists to remove every item at index i where an index in the value "conf" is not >0.

So for the above dict, the output should be this:

1{&quot;level&quot;: [1, 2, 3],
2 &quot;conf&quot;: [-1, 1, 2],
3 &quot;text&quot;: [&quot;here&quot;, &quot;hel&quot;, &quot;llo&quot;]}
4{&quot;level&quot;: [2, 3],
5 &quot;conf&quot;: [1, 2],
6 &quot;text&quot;: [&quot;hel&quot;, &quot;llo&quot;]}
7

As the first value of conf was not > 0.

I have tried something like this:

1{&quot;level&quot;: [1, 2, 3],
2 &quot;conf&quot;: [-1, 1, 2],
3 &quot;text&quot;: [&quot;here&quot;, &quot;hel&quot;, &quot;llo&quot;]}
4{&quot;level&quot;: [2, 3],
5 &quot;conf&quot;: [1, 2],
6 &quot;text&quot;: [&quot;hel&quot;, &quot;llo&quot;]}
7new_dict = {i: [a for a in j if a &gt;= min_conf] for i, j in my_dict.items()}
8

But that would work just for one key.

ANSWER

Answered 2022-Feb-21 at 05:50

I believe this will work: For each list, we will filter the values where conf is negative, and after that we will filter conf itself.

1{&quot;level&quot;: [1, 2, 3],
2 &quot;conf&quot;: [-1, 1, 2],
3 &quot;text&quot;: [&quot;here&quot;, &quot;hel&quot;, &quot;llo&quot;]}
4{&quot;level&quot;: [2, 3],
5 &quot;conf&quot;: [1, 2],
6 &quot;text&quot;: [&quot;hel&quot;, &quot;llo&quot;]}
7new_dict = {i: [a for a in j if a &gt;= min_conf] for i, j in my_dict.items()}
8d = {&quot;level&quot;:[1,2,3], &quot;conf&quot;:[-1,1,2], &quot;text&quot;:[&quot;-1&quot;,&quot;hel&quot;,&quot;llo&quot;]}
9for key in d:
10    if key != &quot;conf&quot;:
11        d[key] = [d[key][i] for i in range(len(d[key])) if d[&quot;conf&quot;][i] &gt;= 0]
12d[&quot;conf&quot;] = [i for i in d[&quot;conf&quot;] if i&gt;=0]
13print(d)
14

A simpler solution will be (exactly the same but using list comprehension, so we don't need to do it separately for conf and the rest:

1{&quot;level&quot;: [1, 2, 3],
2 &quot;conf&quot;: [-1, 1, 2],
3 &quot;text&quot;: [&quot;here&quot;, &quot;hel&quot;, &quot;llo&quot;]}
4{&quot;level&quot;: [2, 3],
5 &quot;conf&quot;: [1, 2],
6 &quot;text&quot;: [&quot;hel&quot;, &quot;llo&quot;]}
7new_dict = {i: [a for a in j if a &gt;= min_conf] for i, j in my_dict.items()}
8d = {&quot;level&quot;:[1,2,3], &quot;conf&quot;:[-1,1,2], &quot;text&quot;:[&quot;-1&quot;,&quot;hel&quot;,&quot;llo&quot;]}
9for key in d:
10    if key != &quot;conf&quot;:
11        d[key] = [d[key][i] for i in range(len(d[key])) if d[&quot;conf&quot;][i] &gt;= 0]
12d[&quot;conf&quot;] = [i for i in d[&quot;conf&quot;] if i&gt;=0]
13print(d)
14d = {&quot;level&quot;:[1,2,3], &quot;conf&quot;:[-1,1,2], &quot;text&quot;:[&quot;-1&quot;,&quot;hel&quot;,&quot;llo&quot;]}
15
16d = {i:[d[i][j] for j in range(len(d[i])) if d[&quot;conf&quot;][j] &gt;= 0] for i in d}
17

Output: {'level': [2, 3], 'conf': [1, 2], 'text': ['hel', 'llo']}

Source https://stackoverflow.com/questions/71184699

QUESTION

android:exported needs to be explicitly specified for &lt;activity&gt;. Apps targeting Android 12 and higher are required to specify

Asked 2022-Feb-23 at 14:13

After upgrading to android 12, the application is not compiling. It shows

"Manifest merger failed with multiple errors, see logs"

Error showing in Merged manifest:

Merging Errors: Error: android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. main manifest (this file)

I have set all the activity with android:exported="false". But it is still showing this issue.

My manifest file:

1&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
2&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
3    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
4    package=&quot;eu.siacs.conversations&quot;&gt;
5
6    &lt;uses-sdk tools:overrideLibrary=&quot;net.ypresto.androidtranscoder&quot; /&gt;
7
8    &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&gt;
9    &lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot; /&gt;
10    &lt;uses-permission android:name=&quot;android.permission.READ_CONTACTS&quot; /&gt;
11    &lt;uses-permission android:name=&quot;android.permission.READ_PROFILE&quot; /&gt;
12    &lt;uses-permission
13        android:name=&quot;android.permission.READ_PHONE_STATE&quot;
14        android:maxSdkVersion=&quot;22&quot; /&gt;
15    &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
16    &lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;
17    &lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;
18    &lt;uses-permission android:name=&quot;android.permission.RECEIVE_BOOT_COMPLETED&quot; /&gt;
19    &lt;uses-permission android:name=&quot;android.permission.VIBRATE&quot; /&gt;
20    &lt;uses-permission android:name=&quot;android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS&quot; /&gt;
21    &lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot; /&gt;
22    &lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot; /&gt;
23    &lt;uses-permission android:name=&quot;android.permission.ACCESS_WIFI_STATE&quot; /&gt;
24    &lt;uses-permission android:name=&quot;android.permission.FOREGROUND_SERVICE&quot; /&gt;
25    &lt;uses-permission android:name=&quot;android.permission.REQUEST_INSTALL_PACKAGES&quot; /&gt;
26
27    &lt;uses-feature
28        android:name=&quot;android.hardware.location&quot;
29        android:required=&quot;false&quot; /&gt;
30    &lt;uses-feature
31        android:name=&quot;android.hardware.location.gps&quot;
32        android:required=&quot;false&quot; /&gt;
33    &lt;uses-feature
34        android:name=&quot;android.hardware.location.network&quot;
35        android:required=&quot;false&quot; /&gt;
36
37    &lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; /&gt;
38    &lt;uses-permission android:name=&quot;android.permission.RECORD_AUDIO&quot; /&gt;
39    &lt;uses-permission android:name=&quot;android.permission.BLUETOOTH&quot; /&gt;
40    &lt;uses-permission android:name=&quot;android.permission.MODIFY_AUDIO_SETTINGS&quot; /&gt;
41    &lt;uses-permission android:name=&quot;android.permission.USE_FULL_SCREEN_INTENT&quot; /&gt;
42    &lt;uses-permission android:name=&quot;android.permission.SYSTEM_ALERT_WINDOW&quot; /&gt;
43
44    &lt;uses-feature
45        android:name=&quot;android.hardware.camera&quot;
46        android:required=&quot;false&quot; /&gt;
47    &lt;uses-feature
48        android:name=&quot;android.hardware.camera.autofocus&quot;
49        android:required=&quot;false&quot; /&gt;
50    &lt;uses-feature
51        android:name=&quot;android.hardware.microphone&quot;
52        android:required=&quot;false&quot; /&gt;
53
54    &lt;application
55        android:name=&quot;.Application&quot;
56        android:allowBackup=&quot;false&quot;
57        android:allowClearUserData=&quot;true&quot;
58        android:appCategory=&quot;social&quot;
59        android:hardwareAccelerated=&quot;true&quot;
60        android:icon=&quot;@mipmap/ic_app_launch&quot;
61        android:label=&quot;@string/app_name&quot;
62        android:largeHeap=&quot;true&quot;
63        android:networkSecurityConfig=&quot;@xml/network_security_configuration&quot;
64        android:requestLegacyExternalStorage=&quot;true&quot;
65        android:roundIcon=&quot;@mipmap/ic_app_launch_round&quot;
66        android:theme=&quot;@style/ConversationsTheme&quot;
67        android:usesCleartextTraffic=&quot;true&quot;
68        android:windowSoftInputMode=&quot;adjustPan|adjustResize&quot;
69        tools:replace=&quot;android:label&quot;
70        tools:targetApi=&quot;q&quot;&gt;
71        &lt;activity
72            android:name=&quot;.ui.search.GroupSearchActivity&quot;
73            android:exported=&quot;true&quot; /&gt;
74        &lt;activity
75            android:name=&quot;.ui.profileUpdating.FavouritesActivity&quot;
76            android:exported=&quot;true&quot; /&gt;
77        &lt;activity
78            android:name=&quot;.ui.profileUpdating.NameActivity&quot;
79            android:exported=&quot;true&quot; /&gt;
80        &lt;activity
81            android:name=&quot;.ui.CompulsoryUpdateActivity&quot;
82            android:exported=&quot;true&quot; /&gt;
83        &lt;activity android:name=&quot;.ui.payments.doPayment.DoPaymentActivity&quot;
84            android:exported=&quot;true&quot; /&gt;
85        &lt;activity android:name=&quot;.ui.individualList.IndividualListActivity&quot;
86            android:exported=&quot;true&quot; /&gt;
87        &lt;activity android:name=&quot;.ui.payments.setPayment.SetPaymentActivity&quot;
88            android:exported=&quot;true&quot; /&gt;
89        &lt;activity android:name=&quot;.ui.login.otpActivity.OTPActivity&quot;
90            android:exported=&quot;true&quot; /&gt;
91        &lt;activity android:name=&quot;.ui.login.loginActivity.LoginActivity&quot;
92            android:exported=&quot;true&quot; /&gt;
93
94        &lt;service android:name=&quot;.services.XmppConnectionService&quot; android:exported=&quot;true&quot; /&gt;
95
96        &lt;receiver android:name=&quot;.services.EventReceiver&quot;
97            android:exported=&quot;true&quot;&gt;
98            &lt;intent-filter&gt;
99                &lt;action android:name=&quot;android.intent.action.BOOT_COMPLETED&quot; /&gt;
100                &lt;action android:name=&quot;android.net.conn.CONNECTIVITY_CHANGE&quot; /&gt;
101                &lt;action android:name=&quot;android.intent.action.ACTION_SHUTDOWN&quot; /&gt;
102                &lt;action android:name=&quot;android.media.RINGER_MODE_CHANGED&quot; /&gt;
103            &lt;/intent-filter&gt;
104        &lt;/receiver&gt;
105
106        &lt;activity
107            android:name=&quot;.ui.ShareLocationActivity&quot;
108            android:label=&quot;@string/title_activity_share_location&quot;
109            android:exported=&quot;true&quot;/&gt;
110        &lt;activity
111            android:name=&quot;.ui.SearchActivity&quot;
112            android:label=&quot;@string/search_messages&quot;
113            android:exported=&quot;true&quot; /&gt;
114        &lt;activity
115            android:name=&quot;.ui.RecordingActivity&quot;
116            android:configChanges=&quot;orientation|screenSize&quot;
117            android:theme=&quot;@style/ConversationsTheme.Dialog&quot;
118            android:exported=&quot;true&quot; /&gt;
119        &lt;activity
120            android:name=&quot;.ui.ShowLocationActivity&quot;
121            android:label=&quot;@string/title_activity_show_location&quot;
122            android:exported=&quot;true&quot; /&gt;
123        &lt;activity
124            android:name=&quot;.ui.SplashActivity&quot;
125            android:theme=&quot;@style/SplashTheme&quot;
126            android:exported=&quot;true&quot;&gt;
127            &lt;intent-filter&gt;
128                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
129
130                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
131            &lt;/intent-filter&gt;
132        &lt;/activity&gt;
133        &lt;activity
134            android:name=&quot;.ui.ConversationsActivity&quot;
135            android:label=&quot;@string/app_name&quot;
136            android:launchMode=&quot;singleTask&quot;
137            android:minWidth=&quot;300dp&quot;
138            android:minHeight=&quot;300dp&quot;
139            android:exported=&quot;true&quot;
140            android:windowSoftInputMode=&quot;stateHidden&quot; /&gt;
141        &lt;activity
142            android:name=&quot;.ui.ScanActivity&quot;
143            android:screenOrientation=&quot;portrait&quot;
144            android:exported=&quot;true&quot;
145            android:theme=&quot;@style/ConversationsTheme.FullScreen&quot;
146            android:windowSoftInputMode=&quot;stateAlwaysHidden&quot; /&gt;
147        &lt;activity
148            android:name=&quot;.ui.UriHandlerActivity&quot;
149            android:label=&quot;@string/app_name&quot;
150            android:exported=&quot;true&quot;&gt;
151            &lt;intent-filter&gt;
152                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
153
154                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
155                &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;
156
157                &lt;data android:scheme=&quot;xmpp&quot; /&gt;
158            &lt;/intent-filter&gt;
159            &lt;intent-filter android:autoVerify=&quot;true&quot;&gt;
160                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
161
162                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
163                &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;
164
165                &lt;data android:scheme=&quot;https&quot; /&gt;
166                &lt;data android:host=&quot;im.app.in&quot; /&gt;
167                &lt;data android:pathPrefix=&quot;/i/&quot; /&gt;
168                &lt;data android:pathPrefix=&quot;/j/&quot; /&gt;
169            &lt;/intent-filter&gt;
170            &lt;intent-filter&gt;
171                &lt;action android:name=&quot;android.intent.action.SENDTO&quot; /&gt;
172
173                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
174
175                &lt;data android:scheme=&quot;imto&quot; /&gt;
176                &lt;data android:host=&quot;jabber&quot; /&gt;
177            &lt;/intent-filter&gt;
178        &lt;/activity&gt;
179        &lt;activity
180            android:name=&quot;.ui.StartConversationActivity&quot;
181            android:label=&quot;@string/title_activity_start_conversation&quot;
182            android:launchMode=&quot;singleTop&quot;
183            android:exported=&quot;true&quot;&gt;
184            &lt;intent-filter&gt;
185                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
186            &lt;/intent-filter&gt;
187        &lt;/activity&gt;
188        &lt;activity
189            android:name=&quot;.ui.SettingsActivity&quot;
190            android:label=&quot;@string/title_activity_settings&quot;
191            android:exported=&quot;true&quot;&gt;
192            &lt;intent-filter&gt;
193                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
194
195                &lt;category android:name=&quot;android.intent.category.NOTIFICATION_PREFERENCES&quot; /&gt;
196            &lt;/intent-filter&gt;
197        &lt;/activity&gt;
198        &lt;activity
199            android:name=&quot;.ui.ChooseContactActivity&quot;
200            android:label=&quot;@string/title_activity_choose_contact&quot;
201            android:exported=&quot;true&quot; /&gt;
202        &lt;activity
203            android:name=&quot;.ui.BlocklistActivity&quot;
204            android:label=&quot;@string/title_activity_block_list&quot;
205            android:exported=&quot;true&quot;/&gt;
206        &lt;activity
207            android:name=&quot;.ui.ChangePasswordActivity&quot;
208            android:label=&quot;@string/change_password_on_server&quot;
209            android:exported=&quot;true&quot;/&gt;
210        &lt;activity
211            android:name=&quot;.ui.ChooseAccountForProfilePictureActivity&quot;
212            android:enabled=&quot;false&quot;
213            android:label=&quot;@string/choose_account&quot;
214            android:exported=&quot;true&quot;&gt;
215            &lt;intent-filter android:label=&quot;@string/set_profile_picture&quot;&gt;
216                &lt;action android:name=&quot;android.intent.action.ATTACH_DATA&quot; /&gt;
217
218                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
219
220                &lt;data android:mimeType=&quot;image/*&quot; /&gt;
221            &lt;/intent-filter&gt;
222        &lt;/activity&gt;
223        &lt;activity
224            android:name=&quot;.ui.ShareViaAccountActivity&quot;
225            android:label=&quot;@string/title_activity_share_via_account&quot;
226            android:launchMode=&quot;singleTop&quot;
227            android:exported=&quot;true&quot; /&gt;
228        &lt;activity
229            android:name=&quot;.ui.EditAccountActivity&quot;
230            android:launchMode=&quot;singleTop&quot;
231            android:exported=&quot;true&quot;
232            android:windowSoftInputMode=&quot;stateHidden|adjustResize&quot; /&gt;
233        &lt;activity
234            android:name=&quot;.ui.ConferenceDetailsActivity&quot;
235            android:label=&quot;@string/action_muc_details&quot;
236            android:exported=&quot;true&quot;
237            android:windowSoftInputMode=&quot;stateHidden&quot; /&gt;
238        &lt;activity
239            android:name=&quot;.ui.ContactDetailsActivity&quot;
240            android:exported=&quot;true&quot;
241            android:windowSoftInputMode=&quot;stateHidden&quot; /&gt;
242        &lt;activity
243            android:name=&quot;.ui.PublishProfilePictureActivity&quot;
244            android:label=&quot;@string/mgmt_account_publish_avatar&quot;
245            android:exported=&quot;true&quot;
246            android:windowSoftInputMode=&quot;stateHidden&quot; /&gt;
247        &lt;activity
248            android:name=&quot;.ui.PublishGroupChatProfilePictureActivity&quot;
249            android:exported=&quot;true&quot;
250            android:label=&quot;@string/group_chat_avatar&quot; /&gt;
251        &lt;activity
252            android:name=&quot;.ui.ShareWithActivity&quot;
253            android:label=&quot;@string/app_name&quot;
254            android:launchMode=&quot;singleTop&quot;
255            android:exported=&quot;true&quot;&gt;
256            &lt;intent-filter&gt;
257                &lt;action android:name=&quot;android.intent.action.SEND&quot; /&gt;
258                &lt;action android:name=&quot;android.intent.action.SEND_MULTIPLE&quot; /&gt;
259
260                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
261
262                &lt;data android:mimeType=&quot;text/plain&quot; /&gt;
263            &lt;/intent-filter&gt;
264            &lt;intent-filter&gt;
265                &lt;action android:name=&quot;android.intent.action.SEND&quot; /&gt;
266                &lt;action android:name=&quot;android.intent.action.SEND_MULTIPLE&quot; /&gt;
267
268                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
269
270                &lt;data android:mimeType=&quot;*/*&quot; /&gt;
271            &lt;/intent-filter&gt;
272
273            &lt;!-- the value here needs to be the full class name; independent of the configured applicationId --&gt;
274            &lt;meta-data
275                android:name=&quot;android.service.chooser.chooser_target_service&quot;
276                android:value=&quot;eu.siacs.conversations.services.ContactChooserTargetService&quot; /&gt;
277        &lt;/activity&gt;
278        &lt;activity
279            android:name=&quot;.ui.TrustKeysActivity&quot;
280            android:label=&quot;@string/trust_omemo_fingerprints&quot;
281            android:exported=&quot;true&quot;
282            android:windowSoftInputMode=&quot;stateAlwaysHidden&quot; /&gt;
283        &lt;activity
284            android:name=&quot;com.theartofdev.edmodo.cropper.CropImageActivity&quot;
285            android:exported=&quot;true&quot;
286            android:theme=&quot;@style/Base.Theme.AppCompat&quot; /&gt;
287        &lt;activity android:name=&quot;.ui.MemorizingActivity&quot;
288            android:exported=&quot;true&quot; /&gt;
289        &lt;activity
290            android:name=&quot;.ui.MediaBrowserActivity&quot;
291            android:exported=&quot;true&quot;
292            android:label=&quot;@string/media_browser&quot; /&gt;
293
294        &lt;service android:name=&quot;.services.ExportBackupService&quot; android:exported=&quot;true&quot;/&gt;
295        &lt;service android:name=&quot;.services.ImportBackupService&quot; android:exported=&quot;true&quot;/&gt;
296        &lt;service
297            android:name=&quot;.services.ContactChooserTargetService&quot;
298            android:permission=&quot;android.permission.BIND_CHOOSER_TARGET_SERVICE&quot;
299            android:exported=&quot;true&quot;&gt;
300            &lt;intent-filter&gt;
301                &lt;action android:name=&quot;android.service.chooser.ChooserTargetService&quot; /&gt;
302            &lt;/intent-filter&gt;
303        &lt;/service&gt;
304        &lt;service android:name=&quot;.services.CompulsoryUpdateService&quot; android:exported=&quot;true&quot;/&gt;
305
306        &lt;provider
307            android:name=&quot;androidx.core.content.FileProvider&quot;
308            android:authorities=&quot;${applicationId}.files&quot;
309            android:exported=&quot;false&quot;
310            android:grantUriPermissions=&quot;true&quot;&gt;
311            &lt;meta-data
312                android:name=&quot;android.support.FILE_PROVIDER_PATHS&quot;
313                android:resource=&quot;@xml/file_paths&quot; /&gt;
314        &lt;/provider&gt;
315        &lt;provider
316            android:name=&quot;.services.BarcodeProvider&quot;
317            android:authorities=&quot;${applicationId}.barcodes&quot;
318            android:exported=&quot;false&quot;
319            android:grantUriPermissions=&quot;true&quot; /&gt;
320
321        &lt;activity
322            android:name=&quot;.ui.ShortcutActivity&quot;
323            android:label=&quot;@string/contact&quot;
324            android:exported=&quot;true&quot;&gt;
325            &lt;intent-filter&gt;
326                &lt;action android:name=&quot;android.intent.action.CREATE_SHORTCUT&quot; /&gt;
327            &lt;/intent-filter&gt;
328        &lt;/activity&gt;
329        &lt;activity
330            android:name=&quot;.ui.MucUsersActivity&quot;
331            android:exported=&quot;true&quot;
332            android:label=&quot;@string/group_chat_members&quot; /&gt;
333        &lt;activity
334            android:name=&quot;.ui.ChannelDiscoveryActivity&quot;
335            android:exported=&quot;true&quot;
336            android:label=&quot;@string/discover_channels&quot; /&gt;
337        &lt;activity
338            android:name=&quot;.ui.RtpSessionActivity&quot;
339            android:autoRemoveFromRecents=&quot;true&quot;
340            android:exported=&quot;true&quot;
341            android:launchMode=&quot;singleInstance&quot;
342            android:supportsPictureInPicture=&quot;true&quot; /&gt;
343    &lt;/application&gt;
344
345&lt;/manifest&gt;
346

My second manifest file:

1&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
2&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
3    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
4    package=&quot;eu.siacs.conversations&quot;&gt;
5
6    &lt;uses-sdk tools:overrideLibrary=&quot;net.ypresto.androidtranscoder&quot; /&gt;
7
8    &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&gt;
9    &lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot; /&gt;
10    &lt;uses-permission android:name=&quot;android.permission.READ_CONTACTS&quot; /&gt;
11    &lt;uses-permission android:name=&quot;android.permission.READ_PROFILE&quot; /&gt;
12    &lt;uses-permission
13        android:name=&quot;android.permission.READ_PHONE_STATE&quot;
14        android:maxSdkVersion=&quot;22&quot; /&gt;
15    &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
16    &lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;
17    &lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;
18    &lt;uses-permission android:name=&quot;android.permission.RECEIVE_BOOT_COMPLETED&quot; /&gt;
19    &lt;uses-permission android:name=&quot;android.permission.VIBRATE&quot; /&gt;
20    &lt;uses-permission android:name=&quot;android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS&quot; /&gt;
21    &lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot; /&gt;
22    &lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot; /&gt;
23    &lt;uses-permission android:name=&quot;android.permission.ACCESS_WIFI_STATE&quot; /&gt;
24    &lt;uses-permission android:name=&quot;android.permission.FOREGROUND_SERVICE&quot; /&gt;
25    &lt;uses-permission android:name=&quot;android.permission.REQUEST_INSTALL_PACKAGES&quot; /&gt;
26
27    &lt;uses-feature
28        android:name=&quot;android.hardware.location&quot;
29        android:required=&quot;false&quot; /&gt;
30    &lt;uses-feature
31        android:name=&quot;android.hardware.location.gps&quot;
32        android:required=&quot;false&quot; /&gt;
33    &lt;uses-feature
34        android:name=&quot;android.hardware.location.network&quot;
35        android:required=&quot;false&quot; /&gt;
36
37    &lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; /&gt;
38    &lt;uses-permission android:name=&quot;android.permission.RECORD_AUDIO&quot; /&gt;
39    &lt;uses-permission android:name=&quot;android.permission.BLUETOOTH&quot; /&gt;
40    &lt;uses-permission android:name=&quot;android.permission.MODIFY_AUDIO_SETTINGS&quot; /&gt;
41    &lt;uses-permission android:name=&quot;android.permission.USE_FULL_SCREEN_INTENT&quot; /&gt;
42    &lt;uses-permission android:name=&quot;android.permission.SYSTEM_ALERT_WINDOW&quot; /&gt;
43
44    &lt;uses-feature
45        android:name=&quot;android.hardware.camera&quot;
46        android:required=&quot;false&quot; /&gt;
47    &lt;uses-feature
48        android:name=&quot;android.hardware.camera.autofocus&quot;
49        android:required=&quot;false&quot; /&gt;
50    &lt;uses-feature
51        android:name=&quot;android.hardware.microphone&quot;
52        android:required=&quot;false&quot; /&gt;
53
54    &lt;application
55        android:name=&quot;.Application&quot;
56        android:allowBackup=&quot;false&quot;
57        android:allowClearUserData=&quot;true&quot;
58        android:appCategory=&quot;social&quot;
59        android:hardwareAccelerated=&quot;true&quot;
60        android:icon=&quot;@mipmap/ic_app_launch&quot;
61        android:label=&quot;@string/app_name&quot;
62        android:largeHeap=&quot;true&quot;
63        android:networkSecurityConfig=&quot;@xml/network_security_configuration&quot;
64        android:requestLegacyExternalStorage=&quot;true&quot;
65        android:roundIcon=&quot;@mipmap/ic_app_launch_round&quot;
66        android:theme=&quot;@style/ConversationsTheme&quot;
67        android:usesCleartextTraffic=&quot;true&quot;
68        android:windowSoftInputMode=&quot;adjustPan|adjustResize&quot;
69        tools:replace=&quot;android:label&quot;
70        tools:targetApi=&quot;q&quot;&gt;
71        &lt;activity
72            android:name=&quot;.ui.search.GroupSearchActivity&quot;
73            android:exported=&quot;true&quot; /&gt;
74        &lt;activity
75            android:name=&quot;.ui.profileUpdating.FavouritesActivity&quot;
76            android:exported=&quot;true&quot; /&gt;
77        &lt;activity
78            android:name=&quot;.ui.profileUpdating.NameActivity&quot;
79            android:exported=&quot;true&quot; /&gt;
80        &lt;activity
81            android:name=&quot;.ui.CompulsoryUpdateActivity&quot;
82            android:exported=&quot;true&quot; /&gt;
83        &lt;activity android:name=&quot;.ui.payments.doPayment.DoPaymentActivity&quot;
84            android:exported=&quot;true&quot; /&gt;
85        &lt;activity android:name=&quot;.ui.individualList.IndividualListActivity&quot;
86            android:exported=&quot;true&quot; /&gt;
87        &lt;activity android:name=&quot;.ui.payments.setPayment.SetPaymentActivity&quot;
88            android:exported=&quot;true&quot; /&gt;
89        &lt;activity android:name=&quot;.ui.login.otpActivity.OTPActivity&quot;
90            android:exported=&quot;true&quot; /&gt;
91        &lt;activity android:name=&quot;.ui.login.loginActivity.LoginActivity&quot;
92            android:exported=&quot;true&quot; /&gt;
93
94        &lt;service android:name=&quot;.services.XmppConnectionService&quot; android:exported=&quot;true&quot; /&gt;
95
96        &lt;receiver android:name=&quot;.services.EventReceiver&quot;
97            android:exported=&quot;true&quot;&gt;
98            &lt;intent-filter&gt;
99                &lt;action android:name=&quot;android.intent.action.BOOT_COMPLETED&quot; /&gt;
100                &lt;action android:name=&quot;android.net.conn.CONNECTIVITY_CHANGE&quot; /&gt;
101                &lt;action android:name=&quot;android.intent.action.ACTION_SHUTDOWN&quot; /&gt;
102                &lt;action android:name=&quot;android.media.RINGER_MODE_CHANGED&quot; /&gt;
103            &lt;/intent-filter&gt;
104        &lt;/receiver&gt;
105
106        &lt;activity
107            android:name=&quot;.ui.ShareLocationActivity&quot;
108            android:label=&quot;@string/title_activity_share_location&quot;
109            android:exported=&quot;true&quot;/&gt;
110        &lt;activity
111            android:name=&quot;.ui.SearchActivity&quot;
112            android:label=&quot;@string/search_messages&quot;
113            android:exported=&quot;true&quot; /&gt;
114        &lt;activity
115            android:name=&quot;.ui.RecordingActivity&quot;
116            android:configChanges=&quot;orientation|screenSize&quot;
117            android:theme=&quot;@style/ConversationsTheme.Dialog&quot;
118            android:exported=&quot;true&quot; /&gt;
119        &lt;activity
120            android:name=&quot;.ui.ShowLocationActivity&quot;
121            android:label=&quot;@string/title_activity_show_location&quot;
122            android:exported=&quot;true&quot; /&gt;
123        &lt;activity
124            android:name=&quot;.ui.SplashActivity&quot;
125            android:theme=&quot;@style/SplashTheme&quot;
126            android:exported=&quot;true&quot;&gt;
127            &lt;intent-filter&gt;
128                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
129
130                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
131            &lt;/intent-filter&gt;
132        &lt;/activity&gt;
133        &lt;activity
134            android:name=&quot;.ui.ConversationsActivity&quot;
135            android:label=&quot;@string/app_name&quot;
136            android:launchMode=&quot;singleTask&quot;
137            android:minWidth=&quot;300dp&quot;
138            android:minHeight=&quot;300dp&quot;
139            android:exported=&quot;true&quot;
140            android:windowSoftInputMode=&quot;stateHidden&quot; /&gt;
141        &lt;activity
142            android:name=&quot;.ui.ScanActivity&quot;
143            android:screenOrientation=&quot;portrait&quot;
144            android:exported=&quot;true&quot;
145            android:theme=&quot;@style/ConversationsTheme.FullScreen&quot;
146            android:windowSoftInputMode=&quot;stateAlwaysHidden&quot; /&gt;
147        &lt;activity
148            android:name=&quot;.ui.UriHandlerActivity&quot;
149            android:label=&quot;@string/app_name&quot;
150            android:exported=&quot;true&quot;&gt;
151            &lt;intent-filter&gt;
152                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
153
154                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
155                &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;
156
157                &lt;data android:scheme=&quot;xmpp&quot; /&gt;
158            &lt;/intent-filter&gt;
159            &lt;intent-filter android:autoVerify=&quot;true&quot;&gt;
160                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
161
162                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
163                &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;
164
165                &lt;data android:scheme=&quot;https&quot; /&gt;
166                &lt;data android:host=&quot;im.app.in&quot; /&gt;
167                &lt;data android:pathPrefix=&quot;/i/&quot; /&gt;
168                &lt;data android:pathPrefix=&quot;/j/&quot; /&gt;
169            &lt;/intent-filter&gt;
170            &lt;intent-filter&gt;
171                &lt;action android:name=&quot;android.intent.action.SENDTO&quot; /&gt;
172
173                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
174
175                &lt;data android:scheme=&quot;imto&quot; /&gt;
176                &lt;data android:host=&quot;jabber&quot; /&gt;
177            &lt;/intent-filter&gt;
178        &lt;/activity&gt;
179        &lt;activity
180            android:name=&quot;.ui.StartConversationActivity&quot;
181            android:label=&quot;@string/title_activity_start_conversation&quot;
182            android:launchMode=&quot;singleTop&quot;
183            android:exported=&quot;true&quot;&gt;
184            &lt;intent-filter&gt;
185                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
186            &lt;/intent-filter&gt;
187        &lt;/activity&gt;
188        &lt;activity
189            android:name=&quot;.ui.SettingsActivity&quot;
190            android:label=&quot;@string/title_activity_settings&quot;
191            android:exported=&quot;true&quot;&gt;
192            &lt;intent-filter&gt;
193                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
194
195                &lt;category android:name=&quot;android.intent.category.NOTIFICATION_PREFERENCES&quot; /&gt;
196            &lt;/intent-filter&gt;
197        &lt;/activity&gt;
198        &lt;activity
199            android:name=&quot;.ui.ChooseContactActivity&quot;
200            android:label=&quot;@string/title_activity_choose_contact&quot;
201            android:exported=&quot;true&quot; /&gt;
202        &lt;activity
203            android:name=&quot;.ui.BlocklistActivity&quot;
204            android:label=&quot;@string/title_activity_block_list&quot;
205            android:exported=&quot;true&quot;/&gt;
206        &lt;activity
207            android:name=&quot;.ui.ChangePasswordActivity&quot;
208            android:label=&quot;@string/change_password_on_server&quot;
209            android:exported=&quot;true&quot;/&gt;
210        &lt;activity
211            android:name=&quot;.ui.ChooseAccountForProfilePictureActivity&quot;
212            android:enabled=&quot;false&quot;
213            android:label=&quot;@string/choose_account&quot;
214            android:exported=&quot;true&quot;&gt;
215            &lt;intent-filter android:label=&quot;@string/set_profile_picture&quot;&gt;
216                &lt;action android:name=&quot;android.intent.action.ATTACH_DATA&quot; /&gt;
217
218                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
219
220                &lt;data android:mimeType=&quot;image/*&quot; /&gt;
221            &lt;/intent-filter&gt;
222        &lt;/activity&gt;
223        &lt;activity
224            android:name=&quot;.ui.ShareViaAccountActivity&quot;
225            android:label=&quot;@string/title_activity_share_via_account&quot;
226            android:launchMode=&quot;singleTop&quot;
227            android:exported=&quot;true&quot; /&gt;
228        &lt;activity
229            android:name=&quot;.ui.EditAccountActivity&quot;
230            android:launchMode=&quot;singleTop&quot;
231            android:exported=&quot;true&quot;
232            android:windowSoftInputMode=&quot;stateHidden|adjustResize&quot; /&gt;
233        &lt;activity
234            android:name=&quot;.ui.ConferenceDetailsActivity&quot;
235            android:label=&quot;@string/action_muc_details&quot;
236            android:exported=&quot;true&quot;
237            android:windowSoftInputMode=&quot;stateHidden&quot; /&gt;
238        &lt;activity
239            android:name=&quot;.ui.ContactDetailsActivity&quot;
240            android:exported=&quot;true&quot;
241            android:windowSoftInputMode=&quot;stateHidden&quot; /&gt;
242        &lt;activity
243            android:name=&quot;.ui.PublishProfilePictureActivity&quot;
244            android:label=&quot;@string/mgmt_account_publish_avatar&quot;
245            android:exported=&quot;true&quot;
246            android:windowSoftInputMode=&quot;stateHidden&quot; /&gt;
247        &lt;activity
248            android:name=&quot;.ui.PublishGroupChatProfilePictureActivity&quot;
249            android:exported=&quot;true&quot;
250            android:label=&quot;@string/group_chat_avatar&quot; /&gt;
251        &lt;activity
252            android:name=&quot;.ui.ShareWithActivity&quot;
253            android:label=&quot;@string/app_name&quot;
254            android:launchMode=&quot;singleTop&quot;
255            android:exported=&quot;true&quot;&gt;
256            &lt;intent-filter&gt;
257                &lt;action android:name=&quot;android.intent.action.SEND&quot; /&gt;
258                &lt;action android:name=&quot;android.intent.action.SEND_MULTIPLE&quot; /&gt;
259
260                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
261
262                &lt;data android:mimeType=&quot;text/plain&quot; /&gt;
263            &lt;/intent-filter&gt;
264            &lt;intent-filter&gt;
265                &lt;action android:name=&quot;android.intent.action.SEND&quot; /&gt;
266                &lt;action android:name=&quot;android.intent.action.SEND_MULTIPLE&quot; /&gt;
267
268                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
269
270                &lt;data android:mimeType=&quot;*/*&quot; /&gt;
271            &lt;/intent-filter&gt;
272
273            &lt;!-- the value here needs to be the full class name; independent of the configured applicationId --&gt;
274            &lt;meta-data
275                android:name=&quot;android.service.chooser.chooser_target_service&quot;
276                android:value=&quot;eu.siacs.conversations.services.ContactChooserTargetService&quot; /&gt;
277        &lt;/activity&gt;
278        &lt;activity
279            android:name=&quot;.ui.TrustKeysActivity&quot;
280            android:label=&quot;@string/trust_omemo_fingerprints&quot;
281            android:exported=&quot;true&quot;
282            android:windowSoftInputMode=&quot;stateAlwaysHidden&quot; /&gt;
283        &lt;activity
284            android:name=&quot;com.theartofdev.edmodo.cropper.CropImageActivity&quot;
285            android:exported=&quot;true&quot;
286            android:theme=&quot;@style/Base.Theme.AppCompat&quot; /&gt;
287        &lt;activity android:name=&quot;.ui.MemorizingActivity&quot;
288            android:exported=&quot;true&quot; /&gt;
289        &lt;activity
290            android:name=&quot;.ui.MediaBrowserActivity&quot;
291            android:exported=&quot;true&quot;
292            android:label=&quot;@string/media_browser&quot; /&gt;
293
294        &lt;service android:name=&quot;.services.ExportBackupService&quot; android:exported=&quot;true&quot;/&gt;
295        &lt;service android:name=&quot;.services.ImportBackupService&quot; android:exported=&quot;true&quot;/&gt;
296        &lt;service
297            android:name=&quot;.services.ContactChooserTargetService&quot;
298            android:permission=&quot;android.permission.BIND_CHOOSER_TARGET_SERVICE&quot;
299            android:exported=&quot;true&quot;&gt;
300            &lt;intent-filter&gt;
301                &lt;action android:name=&quot;android.service.chooser.ChooserTargetService&quot; /&gt;
302            &lt;/intent-filter&gt;
303        &lt;/service&gt;
304        &lt;service android:name=&quot;.services.CompulsoryUpdateService&quot; android:exported=&quot;true&quot;/&gt;
305
306        &lt;provider
307            android:name=&quot;androidx.core.content.FileProvider&quot;
308            android:authorities=&quot;${applicationId}.files&quot;
309            android:exported=&quot;false&quot;
310            android:grantUriPermissions=&quot;true&quot;&gt;
311            &lt;meta-data
312                android:name=&quot;android.support.FILE_PROVIDER_PATHS&quot;
313                android:resource=&quot;@xml/file_paths&quot; /&gt;
314        &lt;/provider&gt;
315        &lt;provider
316            android:name=&quot;.services.BarcodeProvider&quot;
317            android:authorities=&quot;${applicationId}.barcodes&quot;
318            android:exported=&quot;false&quot;
319            android:grantUriPermissions=&quot;true&quot; /&gt;
320
321        &lt;activity
322            android:name=&quot;.ui.ShortcutActivity&quot;
323            android:label=&quot;@string/contact&quot;
324            android:exported=&quot;true&quot;&gt;
325            &lt;intent-filter&gt;
326                &lt;action android:name=&quot;android.intent.action.CREATE_SHORTCUT&quot; /&gt;
327            &lt;/intent-filter&gt;
328        &lt;/activity&gt;
329        &lt;activity
330            android:name=&quot;.ui.MucUsersActivity&quot;
331            android:exported=&quot;true&quot;
332            android:label=&quot;@string/group_chat_members&quot; /&gt;
333        &lt;activity
334            android:name=&quot;.ui.ChannelDiscoveryActivity&quot;
335            android:exported=&quot;true&quot;
336            android:label=&quot;@string/discover_channels&quot; /&gt;
337        &lt;activity
338            android:name=&quot;.ui.RtpSessionActivity&quot;
339            android:autoRemoveFromRecents=&quot;true&quot;
340            android:exported=&quot;true&quot;
341            android:launchMode=&quot;singleInstance&quot;
342            android:supportsPictureInPicture=&quot;true&quot; /&gt;
343    &lt;/application&gt;
344
345&lt;/manifest&gt;
346&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
347&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
348    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
349    package=&quot;eu.siacs.conversations&quot;&gt;
350
351    &lt;application tools:ignore=&quot;GoogleAppIndexingWarning&quot;&gt;
352        &lt;activity
353            android:name=&quot;.ui.ManageAccountActivity&quot;
354            android:label=&quot;@string/title_activity_manage_accounts&quot;
355            android:launchMode=&quot;singleTask&quot;
356            android:exported=&quot;true&quot;/&gt;
357        &lt;activity
358            android:name=&quot;.ui.MagicCreateActivity&quot;
359            android:label=&quot;@string/create_new_account&quot;
360            android:launchMode=&quot;singleTask&quot;
361            android:exported=&quot;true&quot;/&gt;
362        &lt;activity
363            android:name=&quot;.ui.EasyOnboardingInviteActivity&quot;
364            android:label=&quot;@string/invite_to_app&quot;
365            android:launchMode=&quot;singleTask&quot; /&gt;
366        &lt;activity
367            android:name=&quot;.ui.ImportBackupActivity&quot;
368            android:label=&quot;@string/restore_backup&quot;
369            android:launchMode=&quot;singleTask&quot;
370            android:exported=&quot;true&quot;&gt;
371            &lt;intent-filter&gt;
372                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
373                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
374
375                &lt;data android:mimeType=&quot;application/vnd.conversations.backup&quot; /&gt;
376                &lt;data android:scheme=&quot;content&quot; /&gt;
377            &lt;/intent-filter&gt;
378            &lt;intent-filter&gt;
379                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
380                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
381
382                &lt;data android:mimeType=&quot;application/vnd.conversations.backup&quot; /&gt;
383                &lt;data android:scheme=&quot;file&quot; /&gt;
384            &lt;/intent-filter&gt;
385            &lt;intent-filter&gt;
386                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
387
388                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
389                &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;
390
391                &lt;data android:scheme=&quot;content&quot; /&gt;
392                &lt;data android:host=&quot;*&quot; /&gt;
393                &lt;data android:mimeType=&quot;*/*&quot; /&gt;
394                &lt;data android:pathPattern=&quot;.*\\.ceb&quot; /&gt;
395                &lt;data android:pathPattern=&quot;.*\\..*\\.ceb&quot; /&gt;
396                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\.ceb&quot; /&gt;
397                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\.ceb&quot; /&gt;
398                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\..*\\.ceb&quot; /&gt;
399                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\..*\\..*\\.ceb&quot; /&gt;
400                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb&quot; /&gt;
401            &lt;/intent-filter&gt;
402            &lt;intent-filter&gt;
403                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
404
405                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
406                &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;
407
408                &lt;data android:scheme=&quot;file&quot; /&gt;
409                &lt;data android:host=&quot;*&quot; /&gt;
410                &lt;data android:mimeType=&quot;*/*&quot; /&gt;
411                &lt;data android:pathPattern=&quot;.*\\.ceb&quot; /&gt;
412                &lt;data android:pathPattern=&quot;.*\\..*\\.ceb&quot; /&gt;
413                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\.ceb&quot; /&gt;
414                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\.ceb&quot; /&gt;
415                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\..*\\.ceb&quot; /&gt;
416                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\..*\\..*\\.ceb&quot; /&gt;
417                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb&quot; /&gt;
418            &lt;/intent-filter&gt;
419        &lt;/activity&gt;
420    &lt;/application&gt;
421&lt;/manifest&gt;
422
423

My gradle file:

1&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
2&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
3    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
4    package=&quot;eu.siacs.conversations&quot;&gt;
5
6    &lt;uses-sdk tools:overrideLibrary=&quot;net.ypresto.androidtranscoder&quot; /&gt;
7
8    &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&gt;
9    &lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot; /&gt;
10    &lt;uses-permission android:name=&quot;android.permission.READ_CONTACTS&quot; /&gt;
11    &lt;uses-permission android:name=&quot;android.permission.READ_PROFILE&quot; /&gt;
12    &lt;uses-permission
13        android:name=&quot;android.permission.READ_PHONE_STATE&quot;
14        android:maxSdkVersion=&quot;22&quot; /&gt;
15    &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
16    &lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;
17    &lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;
18    &lt;uses-permission android:name=&quot;android.permission.RECEIVE_BOOT_COMPLETED&quot; /&gt;
19    &lt;uses-permission android:name=&quot;android.permission.VIBRATE&quot; /&gt;
20    &lt;uses-permission android:name=&quot;android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS&quot; /&gt;
21    &lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot; /&gt;
22    &lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot; /&gt;
23    &lt;uses-permission android:name=&quot;android.permission.ACCESS_WIFI_STATE&quot; /&gt;
24    &lt;uses-permission android:name=&quot;android.permission.FOREGROUND_SERVICE&quot; /&gt;
25    &lt;uses-permission android:name=&quot;android.permission.REQUEST_INSTALL_PACKAGES&quot; /&gt;
26
27    &lt;uses-feature
28        android:name=&quot;android.hardware.location&quot;
29        android:required=&quot;false&quot; /&gt;
30    &lt;uses-feature
31        android:name=&quot;android.hardware.location.gps&quot;
32        android:required=&quot;false&quot; /&gt;
33    &lt;uses-feature
34        android:name=&quot;android.hardware.location.network&quot;
35        android:required=&quot;false&quot; /&gt;
36
37    &lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; /&gt;
38    &lt;uses-permission android:name=&quot;android.permission.RECORD_AUDIO&quot; /&gt;
39    &lt;uses-permission android:name=&quot;android.permission.BLUETOOTH&quot; /&gt;
40    &lt;uses-permission android:name=&quot;android.permission.MODIFY_AUDIO_SETTINGS&quot; /&gt;
41    &lt;uses-permission android:name=&quot;android.permission.USE_FULL_SCREEN_INTENT&quot; /&gt;
42    &lt;uses-permission android:name=&quot;android.permission.SYSTEM_ALERT_WINDOW&quot; /&gt;
43
44    &lt;uses-feature
45        android:name=&quot;android.hardware.camera&quot;
46        android:required=&quot;false&quot; /&gt;
47    &lt;uses-feature
48        android:name=&quot;android.hardware.camera.autofocus&quot;
49        android:required=&quot;false&quot; /&gt;
50    &lt;uses-feature
51        android:name=&quot;android.hardware.microphone&quot;
52        android:required=&quot;false&quot; /&gt;
53
54    &lt;application
55        android:name=&quot;.Application&quot;
56        android:allowBackup=&quot;false&quot;
57        android:allowClearUserData=&quot;true&quot;
58        android:appCategory=&quot;social&quot;
59        android:hardwareAccelerated=&quot;true&quot;
60        android:icon=&quot;@mipmap/ic_app_launch&quot;
61        android:label=&quot;@string/app_name&quot;
62        android:largeHeap=&quot;true&quot;
63        android:networkSecurityConfig=&quot;@xml/network_security_configuration&quot;
64        android:requestLegacyExternalStorage=&quot;true&quot;
65        android:roundIcon=&quot;@mipmap/ic_app_launch_round&quot;
66        android:theme=&quot;@style/ConversationsTheme&quot;
67        android:usesCleartextTraffic=&quot;true&quot;
68        android:windowSoftInputMode=&quot;adjustPan|adjustResize&quot;
69        tools:replace=&quot;android:label&quot;
70        tools:targetApi=&quot;q&quot;&gt;
71        &lt;activity
72            android:name=&quot;.ui.search.GroupSearchActivity&quot;
73            android:exported=&quot;true&quot; /&gt;
74        &lt;activity
75            android:name=&quot;.ui.profileUpdating.FavouritesActivity&quot;
76            android:exported=&quot;true&quot; /&gt;
77        &lt;activity
78            android:name=&quot;.ui.profileUpdating.NameActivity&quot;
79            android:exported=&quot;true&quot; /&gt;
80        &lt;activity
81            android:name=&quot;.ui.CompulsoryUpdateActivity&quot;
82            android:exported=&quot;true&quot; /&gt;
83        &lt;activity android:name=&quot;.ui.payments.doPayment.DoPaymentActivity&quot;
84            android:exported=&quot;true&quot; /&gt;
85        &lt;activity android:name=&quot;.ui.individualList.IndividualListActivity&quot;
86            android:exported=&quot;true&quot; /&gt;
87        &lt;activity android:name=&quot;.ui.payments.setPayment.SetPaymentActivity&quot;
88            android:exported=&quot;true&quot; /&gt;
89        &lt;activity android:name=&quot;.ui.login.otpActivity.OTPActivity&quot;
90            android:exported=&quot;true&quot; /&gt;
91        &lt;activity android:name=&quot;.ui.login.loginActivity.LoginActivity&quot;
92            android:exported=&quot;true&quot; /&gt;
93
94        &lt;service android:name=&quot;.services.XmppConnectionService&quot; android:exported=&quot;true&quot; /&gt;
95
96        &lt;receiver android:name=&quot;.services.EventReceiver&quot;
97            android:exported=&quot;true&quot;&gt;
98            &lt;intent-filter&gt;
99                &lt;action android:name=&quot;android.intent.action.BOOT_COMPLETED&quot; /&gt;
100                &lt;action android:name=&quot;android.net.conn.CONNECTIVITY_CHANGE&quot; /&gt;
101                &lt;action android:name=&quot;android.intent.action.ACTION_SHUTDOWN&quot; /&gt;
102                &lt;action android:name=&quot;android.media.RINGER_MODE_CHANGED&quot; /&gt;
103            &lt;/intent-filter&gt;
104        &lt;/receiver&gt;
105
106        &lt;activity
107            android:name=&quot;.ui.ShareLocationActivity&quot;
108            android:label=&quot;@string/title_activity_share_location&quot;
109            android:exported=&quot;true&quot;/&gt;
110        &lt;activity
111            android:name=&quot;.ui.SearchActivity&quot;
112            android:label=&quot;@string/search_messages&quot;
113            android:exported=&quot;true&quot; /&gt;
114        &lt;activity
115            android:name=&quot;.ui.RecordingActivity&quot;
116            android:configChanges=&quot;orientation|screenSize&quot;
117            android:theme=&quot;@style/ConversationsTheme.Dialog&quot;
118            android:exported=&quot;true&quot; /&gt;
119        &lt;activity
120            android:name=&quot;.ui.ShowLocationActivity&quot;
121            android:label=&quot;@string/title_activity_show_location&quot;
122            android:exported=&quot;true&quot; /&gt;
123        &lt;activity
124            android:name=&quot;.ui.SplashActivity&quot;
125            android:theme=&quot;@style/SplashTheme&quot;
126            android:exported=&quot;true&quot;&gt;
127            &lt;intent-filter&gt;
128                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
129
130                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
131            &lt;/intent-filter&gt;
132        &lt;/activity&gt;
133        &lt;activity
134            android:name=&quot;.ui.ConversationsActivity&quot;
135            android:label=&quot;@string/app_name&quot;
136            android:launchMode=&quot;singleTask&quot;
137            android:minWidth=&quot;300dp&quot;
138            android:minHeight=&quot;300dp&quot;
139            android:exported=&quot;true&quot;
140            android:windowSoftInputMode=&quot;stateHidden&quot; /&gt;
141        &lt;activity
142            android:name=&quot;.ui.ScanActivity&quot;
143            android:screenOrientation=&quot;portrait&quot;
144            android:exported=&quot;true&quot;
145            android:theme=&quot;@style/ConversationsTheme.FullScreen&quot;
146            android:windowSoftInputMode=&quot;stateAlwaysHidden&quot; /&gt;
147        &lt;activity
148            android:name=&quot;.ui.UriHandlerActivity&quot;
149            android:label=&quot;@string/app_name&quot;
150            android:exported=&quot;true&quot;&gt;
151            &lt;intent-filter&gt;
152                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
153
154                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
155                &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;
156
157                &lt;data android:scheme=&quot;xmpp&quot; /&gt;
158            &lt;/intent-filter&gt;
159            &lt;intent-filter android:autoVerify=&quot;true&quot;&gt;
160                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
161
162                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
163                &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;
164
165                &lt;data android:scheme=&quot;https&quot; /&gt;
166                &lt;data android:host=&quot;im.app.in&quot; /&gt;
167                &lt;data android:pathPrefix=&quot;/i/&quot; /&gt;
168                &lt;data android:pathPrefix=&quot;/j/&quot; /&gt;
169            &lt;/intent-filter&gt;
170            &lt;intent-filter&gt;
171                &lt;action android:name=&quot;android.intent.action.SENDTO&quot; /&gt;
172
173                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
174
175                &lt;data android:scheme=&quot;imto&quot; /&gt;
176                &lt;data android:host=&quot;jabber&quot; /&gt;
177            &lt;/intent-filter&gt;
178        &lt;/activity&gt;
179        &lt;activity
180            android:name=&quot;.ui.StartConversationActivity&quot;
181            android:label=&quot;@string/title_activity_start_conversation&quot;
182            android:launchMode=&quot;singleTop&quot;
183            android:exported=&quot;true&quot;&gt;
184            &lt;intent-filter&gt;
185                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
186            &lt;/intent-filter&gt;
187        &lt;/activity&gt;
188        &lt;activity
189            android:name=&quot;.ui.SettingsActivity&quot;
190            android:label=&quot;@string/title_activity_settings&quot;
191            android:exported=&quot;true&quot;&gt;
192            &lt;intent-filter&gt;
193                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
194
195                &lt;category android:name=&quot;android.intent.category.NOTIFICATION_PREFERENCES&quot; /&gt;
196            &lt;/intent-filter&gt;
197        &lt;/activity&gt;
198        &lt;activity
199            android:name=&quot;.ui.ChooseContactActivity&quot;
200            android:label=&quot;@string/title_activity_choose_contact&quot;
201            android:exported=&quot;true&quot; /&gt;
202        &lt;activity
203            android:name=&quot;.ui.BlocklistActivity&quot;
204            android:label=&quot;@string/title_activity_block_list&quot;
205            android:exported=&quot;true&quot;/&gt;
206        &lt;activity
207            android:name=&quot;.ui.ChangePasswordActivity&quot;
208            android:label=&quot;@string/change_password_on_server&quot;
209            android:exported=&quot;true&quot;/&gt;
210        &lt;activity
211            android:name=&quot;.ui.ChooseAccountForProfilePictureActivity&quot;
212            android:enabled=&quot;false&quot;
213            android:label=&quot;@string/choose_account&quot;
214            android:exported=&quot;true&quot;&gt;
215            &lt;intent-filter android:label=&quot;@string/set_profile_picture&quot;&gt;
216                &lt;action android:name=&quot;android.intent.action.ATTACH_DATA&quot; /&gt;
217
218                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
219
220                &lt;data android:mimeType=&quot;image/*&quot; /&gt;
221            &lt;/intent-filter&gt;
222        &lt;/activity&gt;
223        &lt;activity
224            android:name=&quot;.ui.ShareViaAccountActivity&quot;
225            android:label=&quot;@string/title_activity_share_via_account&quot;
226            android:launchMode=&quot;singleTop&quot;
227            android:exported=&quot;true&quot; /&gt;
228        &lt;activity
229            android:name=&quot;.ui.EditAccountActivity&quot;
230            android:launchMode=&quot;singleTop&quot;
231            android:exported=&quot;true&quot;
232            android:windowSoftInputMode=&quot;stateHidden|adjustResize&quot; /&gt;
233        &lt;activity
234            android:name=&quot;.ui.ConferenceDetailsActivity&quot;
235            android:label=&quot;@string/action_muc_details&quot;
236            android:exported=&quot;true&quot;
237            android:windowSoftInputMode=&quot;stateHidden&quot; /&gt;
238        &lt;activity
239            android:name=&quot;.ui.ContactDetailsActivity&quot;
240            android:exported=&quot;true&quot;
241            android:windowSoftInputMode=&quot;stateHidden&quot; /&gt;
242        &lt;activity
243            android:name=&quot;.ui.PublishProfilePictureActivity&quot;
244            android:label=&quot;@string/mgmt_account_publish_avatar&quot;
245            android:exported=&quot;true&quot;
246            android:windowSoftInputMode=&quot;stateHidden&quot; /&gt;
247        &lt;activity
248            android:name=&quot;.ui.PublishGroupChatProfilePictureActivity&quot;
249            android:exported=&quot;true&quot;
250            android:label=&quot;@string/group_chat_avatar&quot; /&gt;
251        &lt;activity
252            android:name=&quot;.ui.ShareWithActivity&quot;
253            android:label=&quot;@string/app_name&quot;
254            android:launchMode=&quot;singleTop&quot;
255            android:exported=&quot;true&quot;&gt;
256            &lt;intent-filter&gt;
257                &lt;action android:name=&quot;android.intent.action.SEND&quot; /&gt;
258                &lt;action android:name=&quot;android.intent.action.SEND_MULTIPLE&quot; /&gt;
259
260                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
261
262                &lt;data android:mimeType=&quot;text/plain&quot; /&gt;
263            &lt;/intent-filter&gt;
264            &lt;intent-filter&gt;
265                &lt;action android:name=&quot;android.intent.action.SEND&quot; /&gt;
266                &lt;action android:name=&quot;android.intent.action.SEND_MULTIPLE&quot; /&gt;
267
268                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
269
270                &lt;data android:mimeType=&quot;*/*&quot; /&gt;
271            &lt;/intent-filter&gt;
272
273            &lt;!-- the value here needs to be the full class name; independent of the configured applicationId --&gt;
274            &lt;meta-data
275                android:name=&quot;android.service.chooser.chooser_target_service&quot;
276                android:value=&quot;eu.siacs.conversations.services.ContactChooserTargetService&quot; /&gt;
277        &lt;/activity&gt;
278        &lt;activity
279            android:name=&quot;.ui.TrustKeysActivity&quot;
280            android:label=&quot;@string/trust_omemo_fingerprints&quot;
281            android:exported=&quot;true&quot;
282            android:windowSoftInputMode=&quot;stateAlwaysHidden&quot; /&gt;
283        &lt;activity
284            android:name=&quot;com.theartofdev.edmodo.cropper.CropImageActivity&quot;
285            android:exported=&quot;true&quot;
286            android:theme=&quot;@style/Base.Theme.AppCompat&quot; /&gt;
287        &lt;activity android:name=&quot;.ui.MemorizingActivity&quot;
288            android:exported=&quot;true&quot; /&gt;
289        &lt;activity
290            android:name=&quot;.ui.MediaBrowserActivity&quot;
291            android:exported=&quot;true&quot;
292            android:label=&quot;@string/media_browser&quot; /&gt;
293
294        &lt;service android:name=&quot;.services.ExportBackupService&quot; android:exported=&quot;true&quot;/&gt;
295        &lt;service android:name=&quot;.services.ImportBackupService&quot; android:exported=&quot;true&quot;/&gt;
296        &lt;service
297            android:name=&quot;.services.ContactChooserTargetService&quot;
298            android:permission=&quot;android.permission.BIND_CHOOSER_TARGET_SERVICE&quot;
299            android:exported=&quot;true&quot;&gt;
300            &lt;intent-filter&gt;
301                &lt;action android:name=&quot;android.service.chooser.ChooserTargetService&quot; /&gt;
302            &lt;/intent-filter&gt;
303        &lt;/service&gt;
304        &lt;service android:name=&quot;.services.CompulsoryUpdateService&quot; android:exported=&quot;true&quot;/&gt;
305
306        &lt;provider
307            android:name=&quot;androidx.core.content.FileProvider&quot;
308            android:authorities=&quot;${applicationId}.files&quot;
309            android:exported=&quot;false&quot;
310            android:grantUriPermissions=&quot;true&quot;&gt;
311            &lt;meta-data
312                android:name=&quot;android.support.FILE_PROVIDER_PATHS&quot;
313                android:resource=&quot;@xml/file_paths&quot; /&gt;
314        &lt;/provider&gt;
315        &lt;provider
316            android:name=&quot;.services.BarcodeProvider&quot;
317            android:authorities=&quot;${applicationId}.barcodes&quot;
318            android:exported=&quot;false&quot;
319            android:grantUriPermissions=&quot;true&quot; /&gt;
320
321        &lt;activity
322            android:name=&quot;.ui.ShortcutActivity&quot;
323            android:label=&quot;@string/contact&quot;
324            android:exported=&quot;true&quot;&gt;
325            &lt;intent-filter&gt;
326                &lt;action android:name=&quot;android.intent.action.CREATE_SHORTCUT&quot; /&gt;
327            &lt;/intent-filter&gt;
328        &lt;/activity&gt;
329        &lt;activity
330            android:name=&quot;.ui.MucUsersActivity&quot;
331            android:exported=&quot;true&quot;
332            android:label=&quot;@string/group_chat_members&quot; /&gt;
333        &lt;activity
334            android:name=&quot;.ui.ChannelDiscoveryActivity&quot;
335            android:exported=&quot;true&quot;
336            android:label=&quot;@string/discover_channels&quot; /&gt;
337        &lt;activity
338            android:name=&quot;.ui.RtpSessionActivity&quot;
339            android:autoRemoveFromRecents=&quot;true&quot;
340            android:exported=&quot;true&quot;
341            android:launchMode=&quot;singleInstance&quot;
342            android:supportsPictureInPicture=&quot;true&quot; /&gt;
343    &lt;/application&gt;
344
345&lt;/manifest&gt;
346&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
347&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
348    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
349    package=&quot;eu.siacs.conversations&quot;&gt;
350
351    &lt;application tools:ignore=&quot;GoogleAppIndexingWarning&quot;&gt;
352        &lt;activity
353            android:name=&quot;.ui.ManageAccountActivity&quot;
354            android:label=&quot;@string/title_activity_manage_accounts&quot;
355            android:launchMode=&quot;singleTask&quot;
356            android:exported=&quot;true&quot;/&gt;
357        &lt;activity
358            android:name=&quot;.ui.MagicCreateActivity&quot;
359            android:label=&quot;@string/create_new_account&quot;
360            android:launchMode=&quot;singleTask&quot;
361            android:exported=&quot;true&quot;/&gt;
362        &lt;activity
363            android:name=&quot;.ui.EasyOnboardingInviteActivity&quot;
364            android:label=&quot;@string/invite_to_app&quot;
365            android:launchMode=&quot;singleTask&quot; /&gt;
366        &lt;activity
367            android:name=&quot;.ui.ImportBackupActivity&quot;
368            android:label=&quot;@string/restore_backup&quot;
369            android:launchMode=&quot;singleTask&quot;
370            android:exported=&quot;true&quot;&gt;
371            &lt;intent-filter&gt;
372                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
373                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
374
375                &lt;data android:mimeType=&quot;application/vnd.conversations.backup&quot; /&gt;
376                &lt;data android:scheme=&quot;content&quot; /&gt;
377            &lt;/intent-filter&gt;
378            &lt;intent-filter&gt;
379                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
380                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
381
382                &lt;data android:mimeType=&quot;application/vnd.conversations.backup&quot; /&gt;
383                &lt;data android:scheme=&quot;file&quot; /&gt;
384            &lt;/intent-filter&gt;
385            &lt;intent-filter&gt;
386                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
387
388                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
389                &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;
390
391                &lt;data android:scheme=&quot;content&quot; /&gt;
392                &lt;data android:host=&quot;*&quot; /&gt;
393                &lt;data android:mimeType=&quot;*/*&quot; /&gt;
394                &lt;data android:pathPattern=&quot;.*\\.ceb&quot; /&gt;
395                &lt;data android:pathPattern=&quot;.*\\..*\\.ceb&quot; /&gt;
396                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\.ceb&quot; /&gt;
397                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\.ceb&quot; /&gt;
398                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\..*\\.ceb&quot; /&gt;
399                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\..*\\..*\\.ceb&quot; /&gt;
400                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb&quot; /&gt;
401            &lt;/intent-filter&gt;
402            &lt;intent-filter&gt;
403                &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;
404
405                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
406                &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;
407
408                &lt;data android:scheme=&quot;file&quot; /&gt;
409                &lt;data android:host=&quot;*&quot; /&gt;
410                &lt;data android:mimeType=&quot;*/*&quot; /&gt;
411                &lt;data android:pathPattern=&quot;.*\\.ceb&quot; /&gt;
412                &lt;data android:pathPattern=&quot;.*\\..*\\.ceb&quot; /&gt;
413                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\.ceb&quot; /&gt;
414                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\.ceb&quot; /&gt;
415                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\..*\\.ceb&quot; /&gt;
416                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\..*\\..*\\.ceb&quot; /&gt;
417                &lt;data android:pathPattern=&quot;.*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb&quot; /&gt;
418            &lt;/intent-filter&gt;
419        &lt;/activity&gt;
420    &lt;/application&gt;
421&lt;/manifest&gt;
422
423import com.android.build.OutputFile
424
425// Top-level build file where you can add configuration options common to all
426// sub-projects/modules.
427buildscript {
428    ext.kotlin_version = &quot;1.5.21&quot;
429    repositories {
430        google()
431        mavenCentral()
432        maven { url 'https://jitpack.io' }
433        gradlePluginPortal()
434    }
435    dependencies {
436        classpath 'com.android.tools.build:gradle:4.2.2'
437        classpath 'com.google.gms:google-services:4.3.8'
438        classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot;
439    }
440}
441
442apply plugin: 'com.android.application'
443apply plugin: 'kotlin-android'
444apply plugin: 'kotlin-kapt'
445apply plugin: 'com.google.gms.google-services'
446
447repositories {
448    google()
449    mavenCentral()
450    jcenter()
451    maven { url 'https://jitpack.io' }
452}
453
454configurations {
455    conversationsFreeCompatImplementation
456}
457
458dependencies {
459    implementation 'androidx.viewpager:viewpager:1.0.0'
460    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
461
462    implementation &quot;org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version&quot;
463
464    implementation 'org.sufficientlysecure:openpgp-api:10.0'
465    implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
466    implementation 'androidx.appcompat:appcompat:1.3.1'
467    implementation 'androidx.exifinterface:exifinterface:1.3.2'
468    implementation 'androidx.cardview:cardview:1.0.0'
469    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
470    implementation 'androidx.emoji:emoji:1.1.0'
471    implementation 'com.google.android.material:material:1.4.0'
472    conversationsFreeCompatImplementation 'androidx.emoji:emoji-bundled:1.1.0'
473    implementation 'org.bouncycastle:bcmail-jdk15on:1.64'
474    //zxing stopped supporting Java 7 so we have to stick with 3.3.3
475    //https://github.com/zxing/zxing/issues/1170
476    implementation 'com.google.zxing:core:3.4.1'
477    implementation 'de.measite.minidns:minidns-hla:0.2.4'
478    implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
479    implementation 'org.whispersystems:signal-protocol-java:2.8.1'
480    implementation 'com.makeramen:roundedimageview:2.3.0'
481    implementation &quot;com.wefika:flowlayout:0.4.1&quot;
482    implementation 'net.ypresto.androidtranscoder:android-transcoder:0.3.0'
483    implementation 'org.jxmpp:jxmpp-jid:1.0.1'
484    implementation 'org.osmdroid:osmdroid-android:6.1.10'
485    implementation 'org.hsluv:hsluv:0.2'
486    implementation 'org.conscrypt:conscrypt-android:2.5.2'
487    implementation 'me.drakeet.support:toastcompat:1.1.0'
488    implementation &quot;com.leinardi.android:speed-dial:3.2.0&quot;
489
490    implementation &quot;com.squareup.retrofit2:retrofit:2.9.0&quot;
491    implementation &quot;com.squareup.retrofit2:converter-gson:2.9.0&quot;
492    implementation &quot;com.squareup.okhttp3:okhttp:5.0.0-alpha.2&quot;
493    implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2'
494
495    implementation 'com.google.guava:guava:30.1.1-android'
496    implementation 'org.webrtc:google-webrtc:1.0.32006'
497
498    // Lifecycle Helper
499    implementation &quot;androidx.activity:activity-ktx:1.3.0-rc02&quot;
500    implementation &quot;androidx.fragment:fragment-ktx:1.3.6&quot;
501
502    //Navigation
503    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
504    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
505
506    //CardView
507    implementation &quot;androidx.cardview:cardview:1.0.0&quot;
508
509    //Country Code Picker
510    implementation 'com.hbb20:ccp:2.5.3'
511
512    //Firebase
513    implementation 'com.google.firebase:firebase-bom:28.3.0'
514    implementation 'com.google.firebase:firebase-auth-ktx:21.0.1'
515    implementation 'androidx.browser:browser:1.3.0'
516
517    //OTP view
518    implementation 'com.github.mukeshsolanki:android-otpview-pinview:2.1.2'
519
520    //Retrofit
521    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
522    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
523
524    //Gson
525    implementation 'com.google.code.gson:gson:2.8.7'
526
527    //Multidex
528    implementation 'androidx.multidex:multidex:2.0.1'
529
530    //Round Image
531    implementation 'de.hdodenhof:circleimageview:3.1.0'
532
533    // Button with image and text
534    implementation 'com.github.Omega-R:OmegaCenterIconButton:0.0.4@aar'
535
536    //Razor pay
537    implementation 'com.razorpay:checkout:1.6.10'
538
539    //Mixpanel Tracking
540    implementation 'com.mixpanel.android:mixpanel-android:5.9.1'
541
542    //Loading screen
543    implementation 'com.wang.avi:library:2.1.3'
544
545    //Loading
546    implementation 'com.wang.avi:library:2.1.3'
547
548    //Form
549    implementation 'com.quickbirdstudios:surveykit:1.1.0'
550}
551
552ext {
553    travisBuild = System.getenv(&quot;TRAVIS&quot;) == &quot;true&quot;
554    preDexEnabled = System.getProperty(&quot;pre-dex&quot;, &quot;true&quot;)
555    abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
556}
557
558android {
559    compileSdkVersion 31
560
561    defaultConfig {
562        minSdkVersion 24
563        targetSdkVersion 31
564        versionCode 44
565        versionName &quot;2.0.4&quot;
566        multiDexEnabled = true
567        archivesBaseName += &quot;-$versionName&quot;
568        applicationId &quot;com.app.app&quot;
569        resValue &quot;string&quot;, &quot;applicationId&quot;, applicationId
570        def appName = &quot;app&quot;
571        resValue &quot;string&quot;, &quot;app_name&quot;, appName
572        buildConfigField &quot;String&quot;, &quot;APP_NAME&quot;, &quot;\&quot;$appName\&quot;&quot;
573    }
574
575    splits {
576        abi {
577            universalApk true
578            enable true
579        }
580    }
581
582    configurations {
583        compile.exclude group: 'org.jetbrains' , module:'annotations'
584    }
585
586    dataBinding {
587        enabled true
588    }
589
590    dexOptions {
591        // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
592        preDexLibraries = preDexEnabled &amp;&amp; !travisBuild
593        jumboMode true
594    }
595
596    compileOptions {
597        sourceCompatibility JavaVersion.VERSION_1_8
598        targetCompatibility JavaVersion.VERSION_1_8
599    }
600
601    flavorDimensions(&quot;mode&quot;, &quot;distribution&quot;, &quot;emoji&quot;)
602
603    productFlavors {
604
605        conversations {
606            dimension &quot;mode&quot;
607        }
608        free {
609            dimension &quot;distribution&quot;
610            versionNameSuffix &quot;+f&quot;
611        }
612        compat {
613            dimension &quot;emoji&quot;
614            versionNameSuffix &quot;c&quot;
615        }
616    }
617
618    sourceSets {
619        conversationsFreeCompat {
620            java {
621                srcDir 'src/freeCompat/java'
622                srcDir 'src/conversationsFree/java'
623            }
624        }
625    }
626
627    buildTypes {
628        release {
629            shrinkResources true
630            minifyEnabled true
631            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
632            versionNameSuffix &quot;r&quot;
633        }
634        debug {
635            shrinkResources true
636            minifyEnabled true
637            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
638            versionNameSuffix &quot;d&quot;
639        }
640    }
641
642
643    if (new File(&quot;signing.properties&quot;).exists()) {
644        Properties props = new Properties()
645        props.load(new FileInputStream(file(&quot;signing.properties&quot;)))
646
647        signingConfigs {
648            release {
649                storeFile file(props['keystore'])
650                storePassword props['keystore.password']
651                keyAlias props['keystore.alias']
652                keyPassword props['keystore.password']
653            }
654        }
655        buildTypes.release.signingConfig = signingConfigs.release
656    }
657
658    lintOptions {
659        disable 'MissingTranslation', 'InvalidPackage','AppCompatResource'
660    }
661
662    subprojects {
663
664        afterEvaluate {
665            if (getPlugins().hasPlugin('android') ||
666                    getPlugins().hasPlugin('android-library')) {
667
668                configure(android.lintOptions) {
669                    disable 'AndroidGradlePluginVersion', 'MissingTranslation'
670                }
671            }
672
673        }
674    }
675
676    packagingOptions {
677        exclude 'META-INF/BCKEY.DSA'
678        exclude 'META-INF/BCKEY.SF'
679    }
680
681    android.applicationVariants.all { variant -&gt;
682        variant.outputs.each { output -&gt;
683            def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
684            if (baseAbiVersionCode != null) {
685                output.versionCodeOverride = (100 * variant.versionCode) + baseAbiVersionCode
686            }
687        }
688
689    }
690}
691

ANSWER

Answered 2021-Aug-04 at 09:18

I'm not sure what you're using to code, but in order to set it in Android Studio, open the manifest of your project and under the "activity" section, put android:exported="true"(or false if that is what you prefer). I have attached an example.

Source https://stackoverflow.com/questions/68554294

QUESTION

React-hook-form build problem when upgrading nextjs to version 12

Asked 2022-Feb-08 at 23:52

When I upgrade nextjs to version 12 and I run yarn dev it has a problem in react-hook-form library:

SyntaxError: Named export 'set' not found. The requested module react-hook-form is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using ....

Can anyone help me fix this error?

ANSWER

Answered 2021-Nov-01 at 22:06

import your yupResolver slightly differently.

as opposed to:

1import {yupResolver} from '@hookform/resolvers/yup';
2

do:

1import {yupResolver} from '@hookform/resolvers/yup';
2import {yupResolver} from '@hookform/resolvers/yup/dist/yup';
3

Source https://stackoverflow.com/questions/69792558

QUESTION

Why is SFINAE for one of the std::basic_string constructors so restrictive?

Asked 2022-Jan-28 at 12:53
Background

Discussion about this was started under this answer for quite simple question.

Problem

This simple code has unexpected overload resolution of constructor for std::basic_string:

1#include &lt;string&gt;
2
3int main() {
4    std::string s{&quot;some string to test&quot;, 2, 3};
5    return 0;
6}
7

Now someone was expecting that this will invoke this constructor:

std::basic_string<CharT,Traits,Allocator>::basic_string - cppreference.com

template< class T > basic_string( const T& t, size_type pos, size_type n, const Allocator& alloc = Allocator() ); (since C++17) (11)
template< class T > constexpr basic_string( const T& t, size_type pos, size_type const Allocator& alloc = Allocator() ); (since C++20) (11)

Rationale is based on section of this c++ standard:

[string.cons]

template<class T> constexpr basic_string(const T& t, size_type pos, size_type n, const Allocator& a = Allocator());

5 Constraints: is_­convertible_­v<const T&, basic_­string_­view<charT, traits>> is true.

6 Effects: Creates a variable, sv, as if by basic_­string_­view<charT, traits> sv = t; and then behaves the same as: basic_string(sv.substr(pos, n), a);

Now when this code is processed by cppinsights result is different then expected:

1#include &lt;string&gt;
2
3int main() {
4    std::string s{&quot;some string to test&quot;, 2, 3};
5    return 0;
6}
7#include &lt;string&gt;
8
9int main()
10{
11  std::string s = std::basic_string&lt;char&gt;{std::basic_string&lt;char&gt;(&quot;some string to test&quot;, std::allocator&lt;char&gt;()), 2, 3};
12  return 0;
13}
14

After collapsing this code to respective type definitions of std::string it becomes this:

1#include &lt;string&gt;
2
3int main() {
4    std::string s{&quot;some string to test&quot;, 2, 3};
5    return 0;
6}
7#include &lt;string&gt;
8
9int main()
10{
11  std::string s = std::basic_string&lt;char&gt;{std::basic_string&lt;char&gt;(&quot;some string to test&quot;, std::allocator&lt;char&gt;()), 2, 3};
12  return 0;
13}
14#include &lt;string&gt;
15
16int main()
17{
18  std::string s = std::string{std::string(&quot;some string to test&quot;), 2, 3};
19  return 0;
20}
21

So conversion of string literal to std::string was performed and then constructor in form (3) was used. So undesired extra allocation is performed.

I'm sure this is not fault of tool I did other experiments to confirm that. Here is a godbolt example. Assembly clearly follows this pattern.

Analysis

To find explanation of this problem I've introduced an error to this code, so error report prints possible overload resolutions. Here is most interesting part of error report:

1#include &lt;string&gt;
2
3int main() {
4    std::string s{&quot;some string to test&quot;, 2, 3};
5    return 0;
6}
7#include &lt;string&gt;
8
9int main()
10{
11  std::string s = std::basic_string&lt;char&gt;{std::basic_string&lt;char&gt;(&quot;some string to test&quot;, std::allocator&lt;char&gt;()), 2, 3};
12  return 0;
13}
14#include &lt;string&gt;
15
16int main()
17{
18  std::string s = std::string{std::string(&quot;some string to test&quot;), 2, 3};
19  return 0;
20}
21/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:771:9: note: candidate: 'template&lt;class _Tp, class&gt; std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;::basic_string(const _Tp&amp;, size_type, size_type, const _Alloc&amp;) [with &lt;template-parameter-2-2&gt; = _Tp; _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;]'
22  771 |         basic_string(const _Tp&amp; __t, size_type __pos, size_type __n,
23      |         ^~~~~~~~~~~~
24/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:771:9: note:   template argument deduction/substitution failed:
25In file included from /opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/char_traits.h:42,
26                 from /opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/string:40,
27                 from &lt;source&gt;:1:
28/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/type_traits: In substitution of 'template&lt;bool _Cond, class _Tp&gt; using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
29/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:156:8:   required by substitution of 'template&lt;class _CharT, class _Traits, class _Alloc&gt; template&lt;class _Tp, class _Res&gt; using _If_sv = std::enable_if_t&lt;std::__and_&lt;std::is_convertible&lt;const _Tp&amp;, std::basic_string_view&lt;_CharT, _Traits&gt; &gt;, std::__not_&lt;std::is_convertible&lt;const _Tp*, const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;*&gt; &gt;, std::__not_&lt;std::is_convertible&lt;const _Tp&amp;, const _CharT*&gt; &gt; &gt;::value, _Res&gt; [with _Tp = char [20]; _Res = void; _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;]'
30/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:769:30:   required from here
31/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/type_traits:2614:11: error: no type named 'type' in 'struct std::enable_if&lt;false, void&gt;'
32 2614 |     using enable_if_t = typename enable_if&lt;_Cond, _Tp&gt;::type;
33      |           ^~~~~~~~~~~
34

So overload (11) has been rejected by SFINAE.

Related standard library code looks like this: Overload (11) of std::basic_string constructor:

1#include &lt;string&gt;
2
3int main() {
4    std::string s{&quot;some string to test&quot;, 2, 3};
5    return 0;
6}
7#include &lt;string&gt;
8
9int main()
10{
11  std::string s = std::basic_string&lt;char&gt;{std::basic_string&lt;char&gt;(&quot;some string to test&quot;, std::allocator&lt;char&gt;()), 2, 3};
12  return 0;
13}
14#include &lt;string&gt;
15
16int main()
17{
18  std::string s = std::string{std::string(&quot;some string to test&quot;), 2, 3};
19  return 0;
20}
21/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:771:9: note: candidate: 'template&lt;class _Tp, class&gt; std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;::basic_string(const _Tp&amp;, size_type, size_type, const _Alloc&amp;) [with &lt;template-parameter-2-2&gt; = _Tp; _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;]'
22  771 |         basic_string(const _Tp&amp; __t, size_type __pos, size_type __n,
23      |         ^~~~~~~~~~~~
24/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:771:9: note:   template argument deduction/substitution failed:
25In file included from /opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/char_traits.h:42,
26                 from /opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/string:40,
27                 from &lt;source&gt;:1:
28/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/type_traits: In substitution of 'template&lt;bool _Cond, class _Tp&gt; using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
29/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:156:8:   required by substitution of 'template&lt;class _CharT, class _Traits, class _Alloc&gt; template&lt;class _Tp, class _Res&gt; using _If_sv = std::enable_if_t&lt;std::__and_&lt;std::is_convertible&lt;const _Tp&amp;, std::basic_string_view&lt;_CharT, _Traits&gt; &gt;, std::__not_&lt;std::is_convertible&lt;const _Tp*, const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;*&gt; &gt;, std::__not_&lt;std::is_convertible&lt;const _Tp&amp;, const _CharT*&gt; &gt; &gt;::value, _Res&gt; [with _Tp = char [20]; _Res = void; _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;]'
30/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:769:30:   required from here
31/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/type_traits:2614:11: error: no type named 'type' in 'struct std::enable_if&lt;false, void&gt;'
32 2614 |     using enable_if_t = typename enable_if&lt;_Cond, _Tp&gt;::type;
33      |           ^~~~~~~~~~~
34    template&lt;typename _Tp, typename = _If_sv&lt;_Tp, void&gt;&gt;
35    basic_string(const _Tp&amp; __t, size_type __pos, size_type __n,
36             const _Alloc&amp; __a = _Alloc())
37    : basic_string(_S_to_string_view(__t).substr(__pos, __n), __a) { }
38

And here is implementation of _If_sv:

1#include &lt;string&gt;
2
3int main() {
4    std::string s{&quot;some string to test&quot;, 2, 3};
5    return 0;
6}
7#include &lt;string&gt;
8
9int main()
10{
11  std::string s = std::basic_string&lt;char&gt;{std::basic_string&lt;char&gt;(&quot;some string to test&quot;, std::allocator&lt;char&gt;()), 2, 3};
12  return 0;
13}
14#include &lt;string&gt;
15
16int main()
17{
18  std::string s = std::string{std::string(&quot;some string to test&quot;), 2, 3};
19  return 0;
20}
21/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:771:9: note: candidate: 'template&lt;class _Tp, class&gt; std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;::basic_string(const _Tp&amp;, size_type, size_type, const _Alloc&amp;) [with &lt;template-parameter-2-2&gt; = _Tp; _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;]'
22  771 |         basic_string(const _Tp&amp; __t, size_type __pos, size_type __n,
23      |         ^~~~~~~~~~~~
24/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:771:9: note:   template argument deduction/substitution failed:
25In file included from /opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/char_traits.h:42,
26                 from /opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/string:40,
27                 from &lt;source&gt;:1:
28/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/type_traits: In substitution of 'template&lt;bool _Cond, class _Tp&gt; using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
29/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:156:8:   required by substitution of 'template&lt;class _CharT, class _Traits, class _Alloc&gt; template&lt;class _Tp, class _Res&gt; using _If_sv = std::enable_if_t&lt;std::__and_&lt;std::is_convertible&lt;const _Tp&amp;, std::basic_string_view&lt;_CharT, _Traits&gt; &gt;, std::__not_&lt;std::is_convertible&lt;const _Tp*, const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;*&gt; &gt;, std::__not_&lt;std::is_convertible&lt;const _Tp&amp;, const _CharT*&gt; &gt; &gt;::value, _Res&gt; [with _Tp = char [20]; _Res = void; _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;]'
30/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:769:30:   required from here
31/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/type_traits:2614:11: error: no type named 'type' in 'struct std::enable_if&lt;false, void&gt;'
32 2614 |     using enable_if_t = typename enable_if&lt;_Cond, _Tp&gt;::type;
33      |           ^~~~~~~~~~~
34    template&lt;typename _Tp, typename = _If_sv&lt;_Tp, void&gt;&gt;
35    basic_string(const _Tp&amp; __t, size_type __pos, size_type __n,
36             const _Alloc&amp; __a = _Alloc())
37    : basic_string(_S_to_string_view(__t).substr(__pos, __n), __a) { }
38    template&lt;typename _Tp, typename _Res&gt;
39    using _If_sv = enable_if_t&lt;
40      __and_&lt;is_convertible&lt;const _Tp&amp;, __sv_type&gt;,
41         __not_&lt;is_convertible&lt;const _Tp*, const basic_string*&gt;&gt;,
42         __not_&lt;is_convertible&lt;const _Tp&amp;, const _CharT*&gt;&gt;&gt;::value,
43      _Res&gt;;
44

So last part of this condition: __not_<is_convertible<const _Tp&, const _CharT*>>>::value is a problem since clearly char array (string literal) is convertible to pointer to characters.

Question

Why does the implementation of _If_sv look like this? What is the rationale of having this extra condition which is not mentioned in the standard?

If I understand overload resolution correctly, this extra condition is obsolete, since when first argument is std::string overloads (3) has priority over overload (11) as exact match of non template function. On the other hand if an argument is something other than std::string and it is convertible to std::string_view then template overload (11) should win and extra allocation is avoided.

Is this a bug in the implementation of the standard library or did I miss something?

Why are these extra SFINAE conditions needed?

Bonus question

Is there a nice way to write a test which detects this issue? Some ways to verify that a proper overload has been selected without modifying tested code (in this case std::basic_string)?

ANSWER

Answered 2022-Jan-05 at 12:05

Maybe I'm wrong, but it seems that last part:

1#include &lt;string&gt;
2
3int main() {
4    std::string s{&quot;some string to test&quot;, 2, 3};
5    return 0;
6}
7#include &lt;string&gt;
8
9int main()
10{
11  std::string s = std::basic_string&lt;char&gt;{std::basic_string&lt;char&gt;(&quot;some string to test&quot;, std::allocator&lt;char&gt;()), 2, 3};
12  return 0;
13}
14#include &lt;string&gt;
15
16int main()
17{
18  std::string s = std::string{std::string(&quot;some string to test&quot;), 2, 3};
19  return 0;
20}
21/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:771:9: note: candidate: 'template&lt;class _Tp, class&gt; std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;::basic_string(const _Tp&amp;, size_type, size_type, const _Alloc&amp;) [with &lt;template-parameter-2-2&gt; = _Tp; _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;]'
22  771 |         basic_string(const _Tp&amp; __t, size_type __pos, size_type __n,
23      |         ^~~~~~~~~~~~
24/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:771:9: note:   template argument deduction/substitution failed:
25In file included from /opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/char_traits.h:42,
26                 from /opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/string:40,
27                 from &lt;source&gt;:1:
28/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/type_traits: In substitution of 'template&lt;bool _Cond, class _Tp&gt; using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
29/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:156:8:   required by substitution of 'template&lt;class _CharT, class _Traits, class _Alloc&gt; template&lt;class _Tp, class _Res&gt; using _If_sv = std::enable_if_t&lt;std::__and_&lt;std::is_convertible&lt;const _Tp&amp;, std::basic_string_view&lt;_CharT, _Traits&gt; &gt;, std::__not_&lt;std::is_convertible&lt;const _Tp*, const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;*&gt; &gt;, std::__not_&lt;std::is_convertible&lt;const _Tp&amp;, const _CharT*&gt; &gt; &gt;::value, _Res&gt; [with _Tp = char [20]; _Res = void; _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;]'
30/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:769:30:   required from here
31/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/type_traits:2614:11: error: no type named 'type' in 'struct std::enable_if&lt;false, void&gt;'
32 2614 |     using enable_if_t = typename enable_if&lt;_Cond, _Tp&gt;::type;
33      |           ^~~~~~~~~~~
34    template&lt;typename _Tp, typename = _If_sv&lt;_Tp, void&gt;&gt;
35    basic_string(const _Tp&amp; __t, size_type __pos, size_type __n,
36             const _Alloc&amp; __a = _Alloc())
37    : basic_string(_S_to_string_view(__t).substr(__pos, __n), __a) { }
38    template&lt;typename _Tp, typename _Res&gt;
39    using _If_sv = enable_if_t&lt;
40      __and_&lt;is_convertible&lt;const _Tp&amp;, __sv_type&gt;,
41         __not_&lt;is_convertible&lt;const _Tp*, const basic_string*&gt;&gt;,
42         __not_&lt;is_convertible&lt;const _Tp&amp;, const _CharT*&gt;&gt;&gt;::value,
43      _Res&gt;;
44__not_&lt;is_convertible&lt;const _Tp&amp;, const _CharT*&gt;&gt;&gt;::value
45

is added to _If_sv for preventing ambiguity between these 2 constructors:

1#include &lt;string&gt;
2
3int main() {
4    std::string s{&quot;some string to test&quot;, 2, 3};
5    return 0;
6}
7#include &lt;string&gt;
8
9int main()
10{
11  std::string s = std::basic_string&lt;char&gt;{std::basic_string&lt;char&gt;(&quot;some string to test&quot;, std::allocator&lt;char&gt;()), 2, 3};
12  return 0;
13}
14#include &lt;string&gt;
15
16int main()
17{
18  std::string s = std::string{std::string(&quot;some string to test&quot;), 2, 3};
19  return 0;
20}
21/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:771:9: note: candidate: 'template&lt;class _Tp, class&gt; std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;::basic_string(const _Tp&amp;, size_type, size_type, const _Alloc&amp;) [with &lt;template-parameter-2-2&gt; = _Tp; _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;]'
22  771 |         basic_string(const _Tp&amp; __t, size_type __pos, size_type __n,
23      |         ^~~~~~~~~~~~
24/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:771:9: note:   template argument deduction/substitution failed:
25In file included from /opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/char_traits.h:42,
26                 from /opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/string:40,
27                 from &lt;source&gt;:1:
28/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/type_traits: In substitution of 'template&lt;bool _Cond, class _Tp&gt; using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
29/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:156:8:   required by substitution of 'template&lt;class _CharT, class _Traits, class _Alloc&gt; template&lt;class _Tp, class _Res&gt; using _If_sv = std::enable_if_t&lt;std::__and_&lt;std::is_convertible&lt;const _Tp&amp;, std::basic_string_view&lt;_CharT, _Traits&gt; &gt;, std::__not_&lt;std::is_convertible&lt;const _Tp*, const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;*&gt; &gt;, std::__not_&lt;std::is_convertible&lt;const _Tp&amp;, const _CharT*&gt; &gt; &gt;::value, _Res&gt; [with _Tp = char [20]; _Res = void; _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;]'
30/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/bits/basic_string.h:769:30:   required from here
31/opt/compiler-explorer/gcc-trunk-20220104/include/c++/12.0.0/type_traits:2614:11: error: no type named 'type' in 'struct std::enable_if&lt;false, void&gt;'
32 2614 |     using enable_if_t = typename enable_if&lt;_Cond, _Tp&gt;::type;
33      |           ^~~~~~~~~~~
34    template&lt;typename _Tp, typename = _If_sv&lt;_Tp, void&gt;&gt;
35    basic_string(const _Tp&amp; __t, size_type __pos, size_type __n,
36             const _Alloc&amp; __a = _Alloc())
37    : basic_string(_S_to_string_view(__t).substr(__pos, __n), __a) { }
38    template&lt;typename _Tp, typename _Res&gt;
39    using _If_sv = enable_if_t&lt;
40      __and_&lt;is_convertible&lt;const _Tp&amp;, __sv_type&gt;,
41         __not_&lt;is_convertible&lt;const _Tp*, const basic_string*&gt;&gt;,
42         __not_&lt;is_convertible&lt;const _Tp&amp;, const _CharT*&gt;&gt;&gt;::value,
43      _Res&gt;;
44__not_&lt;is_convertible&lt;const _Tp&amp;, const _CharT*&gt;&gt;&gt;::value
45constexpr basic_string( const CharT* s,
46                        const Allocator&amp; alloc = Allocator() ); //(5)
47
48template&lt; class T &gt;
49explicit basic_string( const T&amp; t,
50                       const Allocator&amp; alloc = Allocator() ); //(10)
51

(10) should be selected if T is convertible to string_view. But (10) is explicit so this problem should be selected without {}. I don't think this check is needed in _If_sv. They probably have used same _If_sv for both overloads (10) and (11) that you mentioned, so both are working incorrectly now.

Source https://stackoverflow.com/questions/70591571

QUESTION

Tailwind V3 causing TypeError: Cannot read property '500' of undefined

Asked 2022-Jan-26 at 20:02

I recently tried to upgrade my project to tailwind css and I'm getting this error

Console Error

this is my tailwind config

1 module.exports = {
2      mode: &quot;jit&quot;,
3      purge: [&quot;./pages/**/*.{js,ts,jsx,tsx}&quot;, &quot;./components/**/*.{js,ts,jsx,tsx}&quot;],
4      darkMode: &quot;class&quot;, // or 'media' or 'class'
5      theme: {
6        extend: {
7          colors: {
8            secondaryDark: &quot;#171A1A&quot;,
9            primaryDark: &quot;#090A0A&quot;,
10            neonOrange: &quot;#FF9933&quot;,
11            redditRed: &quot;#FF5700&quot;,
12            cardGradientPrimary: &quot;#ff930f&quot;,
13            cardGradientSecondary: &quot;#fff95b&quot;,
14          },
15        },
16      },
17      variants: {
18        extend: {},
19      },
20      plugins: [require(&quot;@tailwindcss/forms&quot;)],
21    };
22

ANSWER

Answered 2021-Dec-11 at 03:50

I have the same issue after upgrade to tailwind v3 and fixed it by update @tailwindcss/forms to 0.4.0

Source https://stackoverflow.com/questions/70304366

QUESTION

How can I efficiently calculate a quadratic form in Julia?

Asked 2022-Jan-10 at 14:47

I would like to calculate a quadratic form: x' Q y in Julia.
What would be the most efficient way to calculate this for the cases:

  1. No assumption.
  2. Q is symmetric.
  3. x and y are the same (x = y).
  4. Both Q is symmetric and x = y.

I know Julia has dot(). But I wonder if it is faster than BLAS call.

ANSWER

Answered 2022-Jan-09 at 22:28

If your matrix is symmetric use the Symmetric wrapper to improve performance (a different method is called then):

1julia&gt; a = rand(10000); b = rand(10000);
2
3julia&gt; x = rand(10000, 10000); x = (x + x') / 2;
4
5julia&gt; y = Symmetric(x);
6
7julia&gt; @btime dot($a, $x, $b);
8  47.000 ms (0 allocations: 0 bytes)
9
10julia&gt; @btime dot($a, $y, $b);
11  27.392 ms (0 allocations: 0 bytes)
12

If x is the same as y see https://discourse.julialang.org/t/most-efficient-way-to-compute-a-quadratic-matrix-form/66606 for a discussion of options (but in general it seems dot is still fast then).

Source https://stackoverflow.com/questions/70645845

Community Discussions contain sources that include Stack Exchange Network

Tutorials and Learning Resources in Form

Tutorials and Learning Resources are not available at this moment for Form

Share this Page

share link

Get latest updates on Form