Skip to content

Commit

Permalink
Merge pull request #89 from Grigory-Rylov/no_more_platform_specific_apps
Browse files Browse the repository at this point in the history
fix building standalone app
  • Loading branch information
Grigory-Rylov committed Jan 18, 2023
2 parents b2036fe + 472517c commit 35c4237
Show file tree
Hide file tree
Showing 14 changed files with 137 additions and 928 deletions.
18 changes: 5 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,9 @@ by searching for "Launch YAMP" in "Find Actions" (osx: cmd+shift+a, windows/linu

https://plugins.jetbrains.com/plugin/16167-yamp

### Mac OS X
1. Open DMG file
2. Drag Android Methods Profiler icon into Applications shurtcut
3. Open Applications and right mouse click on **Android Methods Profiler** and select "Open" (only first launch)

### Linux
Open terminal and execute `sudo dpkg -i android-methods-profiler_{YOUR_VERSION}_all.deb`

If some older files cannot be overwritten, try `sudo dpkg -i --force-overwrite android-methods-profiler_{YOUR_VERSION}_all.deb`

To launch type in terminal `andoid-methods-profiler` or `yamp`. Or you can open in menu by pressing Meta
### Standalone app
1. Download android-methods-profiler_{YOUR_VERSION}.jar
2. execute `java -jar android-methods-profiler_{YOUR_VERSION}.jar`

## Keymap
Read about keymap [there](docs/KEYMAP.MD)
Expand Down Expand Up @@ -126,10 +118,10 @@ To scale application on hi-res displays on linux, try to edit `/opt/android-meth

# Building
## App
Execute `./gradlew clean :app:buildInstaller` , release will be placed at `app/build/release`
Execute `./gradlew clean :app:fatJar` , release will be placed at `app/build/libs`

## Plugin
Execute `./gradlew clean :plugin:buildPlugin` , plugin wiil be placed at `plugin/build/`
Execute `./gradlew clean :plugin:buildPlugin` , plugin will be placed at `plugin/build/distributions`

# License

Expand Down
44 changes: 4 additions & 40 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.gradle.internal.os.OperatingSystem

plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm'
Expand All @@ -8,25 +6,7 @@ plugins {
group 'com.github.grishberg'
version = ext.productVersion

def use_jdk8 = project.hasProperty("use_jdk8")

if (use_jdk8) {
sourceCompatibility = 8
} else {
sourceCompatibility = 11
}

sourceSets {
main {
java {
if (use_jdk8) {
srcDir 'src/linux/java'
} else {
srcDir 'src/mac/java'
}
}
}
}
sourceCompatibility = 11

repositories {
mavenCentral()
Expand Down Expand Up @@ -66,30 +46,14 @@ task fatJar(type: Jar) {
'Implementation-Title': 'Android Methods Profiler',
'Implementation-Version': version
}

duplicatesStrategy = DuplicatesStrategy.EXCLUDE

baseName = 'android-methods-profiler'
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "MaterialUISwingDemo*.class" exclude "module-info.class"
}
with jar
}

String installerScript = ""

if (OperatingSystem.current().isLinux()) {
installerScript = "buildScripts/linuxApplication"
} else if (OperatingSystem.current().isWindows()) {
installerScript = ""
} else if (OperatingSystem.current().isMacOsX()) {
installerScript = "buildScripts/macOsApplication"
}

// ./gradlew clean buildInstaller
task buildInstaller(type: Exec) {
dependsOn fatJar
workingDir '.'
commandLine "./${installerScript}"
args version
}
Loading

0 comments on commit 35c4237

Please sign in to comment.